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

Stewart Smith stewart at linux.ibm.com
Tue May 29 16:18:08 AEST 2018


This warning appears to not be particularly useful if you ever
actually *want* to truncate a string.

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

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))
-- 
2.17.0



More information about the Skiboot mailing list