summaryrefslogtreecommitdiff
path: root/utils/fwparam_ibft/Makefile
diff options
context:
space:
mode:
authorLee Duncan <lduncan@suse.com>2017-12-02 13:55:51 -0800
committerLee Duncan <lduncan@suse.com>2017-12-02 13:55:51 -0800
commit9f6f3b0b37fc38df0e5c4f90e94d837ed1ec2f29 (patch)
treed009aacc6f1d0e8455eab8a7375507b23fb64115 /utils/fwparam_ibft/Makefile
parent0715d725fa2793b051f14509d07651a69bac81e7 (diff)
downloadopen-iscsi-9f6f3b0b37fc38df0e5c4f90e94d837ed1ec2f29.tar.gz
Fix compiler warnings about string overflows in prom_parse
Gcc compiler version 7.2.1 complains about possible string overflow from prom_parse.y: > prom_parse.tab.c: In function ‘yyparse’: > prom_parse.y:98:25: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 0 and 255 [-Wformat-overflow=] > sprintf($$, "%s/%s", $<str>1, $<str>3); > ^~~~~~~ So make the string buffer larger. Also, tell the compiler it is ok if we truncate strings, since our buffer is very large. Lastly, ensure we use strncpy() when copying strings.
Diffstat (limited to 'utils/fwparam_ibft/Makefile')
-rw-r--r--utils/fwparam_ibft/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/fwparam_ibft/Makefile b/utils/fwparam_ibft/Makefile
index ade8a56..39ea878 100644
--- a/utils/fwparam_ibft/Makefile
+++ b/utils/fwparam_ibft/Makefile
@@ -27,7 +27,7 @@ OBJS += prom_lex.o prom_parse.tab.o fwparam_ppc.o
CLEANFILES = $(OBJS) *.output *~
CFLAGS ?= -O2 -g
-WARNFLAGS ?= -Wall -Wstrict-prototypes
+WARNFLAGS ?= -Wall -Wstrict-prototypes -Wno-format-truncation
CFLAGS += -fPIC $(WARNFLAGS) -I../../include -I../../usr -D_GNU_SOURCE
all: $(OBJS)