diff mbox series

[5/7] Add -Wno-stringop-truncation for GCC8

Message ID 20180529061810.28003-6-stewart@linux.ibm.com
State Accepted
Headers show
Series Build fixes for GCC8 / Fedora 28 | expand

Commit Message

Stewart Smith May 29, 2018, 6:18 a.m. UTC
This warning appears to not be particularly useful if you ever
actually *want* to truncate a string.

Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
---
 Makefile.main          | 1 +
 external/gard/rules.mk | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/Makefile.main b/Makefile.main
index 6e0e4be7cf51..a155e1e66601 100644
--- a/Makefile.main
+++ b/Makefile.main
@@ -31,6 +31,7 @@  CWARNS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
 	  -Wwrite-strings -Wcast-align \
 	  -Winit-self \
 	  -Wframe-larger-than=1024 \
+	  -Wno-stringop-truncation \
 	  -Werror
 
 # Host tools and options
diff --git a/external/gard/rules.mk b/external/gard/rules.mk
index a0bcfdc549b0..3af5d1a6a839 100644
--- a/external/gard/rules.mk
+++ b/external/gard/rules.mk
@@ -1,6 +1,6 @@ 
 .DEFAULT_GOAL := all
 
-override CFLAGS += -O2 -Wall -Werror -I.
+override CFLAGS += -O2 -Wall -Werror -Wno-stringop-truncation -I.
 OBJS      = version.o gard.o units.o
 LIBFLASH_FILES    := libflash.c libffs.c ecc.c blocklevel.c file.c
 LIBFLASH_OBJS     := $(addprefix libflash-, $(LIBFLASH_FILES:.c=.o))