summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-07-12 19:25:47 -0700
committerSeung-Woo Kim <sw0312.kim@samsung.com>2017-10-23 19:06:49 +0900
commit13f2ed4724423ea01b65de35fc023ec68b1ee5a0 (patch)
tree3d54bc94d7290b984ccc43024c24848c49a4bfce
parent38b49e085208b237e60a1cf36ecc480688d2f34a (diff)
downloadlinux-exynos-13f2ed4724423ea01b65de35fc023ec68b1ee5a0.tar.gz
linux-exynos-13f2ed4724423ea01b65de35fc023ec68b1ee5a0.tar.bz2
linux-exynos-13f2ed4724423ea01b65de35fc023ec68b1ee5a0.zip
disable new gcc-7.1.1 warnings for now
I made the mistake of upgrading my desktop to the new Fedora 26 that comes with gcc-7.1.1. There's nothing wrong per se that I've noticed, but I now have 1500 lines of warnings, mostly from the new format-truncation warning triggering all over the tree. We use 'snprintf()' and friends in a lot of places, and often know that the numbers are fairly small (ie a controller index or similar), but gcc doesn't know that, and sees an 'int', and thinks that it could be some huge number. And then complains when our buffers are not able to fit the name for the ten millionth controller. These warnings aren't necessarily bad per se, and we probably want to look through them subsystem by subsystem, but at least during the merge window they just mean that I can't even see if somebody is introducing any *real* problems when I pull. So warnings disabled for now. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> [sw0312.kim: backport from mainline to fix gcc-7 build warnings] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: Ic7c286d72d03dbed393efa48142a571d82045d87
-rw-r--r--Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index d036222c7f64..32bd12e52663 100644
--- a/Makefile
+++ b/Makefile
@@ -610,6 +610,9 @@ all: vmlinux
include arch/$(SRCARCH)/Makefile
KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,)
+KBUILD_CFLAGS += $(call cc-disable-warning, format-truncation)
+KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow)
+KBUILD_CFLAGS += $(call cc-disable-warning, int-in-bool-context)
KBUILD_CFLAGS += $(call cc-option,-fno-PIE)
KBUILD_AFLAGS += $(call cc-option,-fno-PIE)