aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Chancellor <natechancellor@gmail.com>2017-05-25 01:31:45 -0700
committerMister Oyster <oysterized@gmail.com>2017-12-18 19:27:09 +0100
commit0aea325be2ed618968bedc4980da3937a9245b49 (patch)
tree49617afd17d8149d4893bb12ccc92fb4ba91d2de
parentd526916b661badeab9ba8dc05279936cf49f88f3 (diff)
Makefile: Disable "format-truncation" warning globally
This was introduced in GCC 7.x: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wformat-truncation This warning doesn't really make sense in the context of the kernel because there is no way for the values it complains about to be cut off. For example, it complains about a cpu int getting truncated, when in reality it will never be over 7 for this device (octacore). Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
-rw-r--r--Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 28b3b354a..a255348cd 100644
--- a/Makefile
+++ b/Makefile
@@ -590,6 +590,9 @@ all: vmlinux
KBUILD_CFLAGS += $(call cc-disable-warning,maybe-uninitialized,)
+# Disable format-truncation warnings
+KBUILD_CFLAGS += $(call cc-disable-warning,format-truncation,)
+
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
KBUILD_CFLAGS += -Os
else