linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/22] kbuild: disable -Wformat-truncation warnings by default
       [not found] <20170714120720.906842-1-arnd@arndb.de>
@ 2017-07-14 12:06 ` Arnd Bergmann
  0 siblings, 0 replies; only message in thread
From: Arnd Bergmann @ 2017-07-14 12:06 UTC (permalink / raw)
  To: linux-kernel, Masahiro Yamada, Michal Marek
  Cc: Greg Kroah-Hartman, Linus Torvalds, Guenter Roeck, akpm, netdev,
	David S . Miller, James E . J . Bottomley, Martin K . Petersen,
	linux-scsi, x86, Arnd Bergmann, linux-kbuild

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(+)

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
-- 
2.9.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-07-14 12:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20170714120720.906842-1-arnd@arndb.de>
2017-07-14 12:06 ` [PATCH 01/22] kbuild: disable -Wformat-truncation warnings by default Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).