diff mbox series

[01/22] kbuild: disable -Wformat-truncation warnings by default

Message ID 20170714120720.906842-2-arnd@arndb.de
State New
Headers show
Series gcc-7 -Wformat-* warnings | expand

Commit Message

Arnd Bergmann July 14, 2017, 12:06 p.m. UTC
With x86 allmodconfig, we currently get 233 -Wformat-truncation warnings,
which makes the entire warnings rather useless.

This turns off the warning by default, unless we specify W=1 or higher

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
 scripts/Makefile.extrawarn | 3 +++
 1 file changed, 3 insertions(+)

-- 
2.9.0
diff mbox series

Patch

diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index fb3522fd8702..4b63c2f71adb 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -67,5 +67,8 @@  KBUILD_CFLAGS += $(call cc-disable-warning, format)
 KBUILD_CFLAGS += $(call cc-disable-warning, sign-compare)
 KBUILD_CFLAGS += $(call cc-disable-warning, format-zero-length)
 KBUILD_CFLAGS += $(call cc-disable-warning, uninitialized)
+else
+# noisy gcc-7 warnings
+KBUILD_CFLAGS += $(call cc-option,-Wformat-truncation=0)
 endif
 endif