kbuild: add -Wno-unused-but-set-variable flag unconditionally
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 2 Oct 2018 01:32:23 +0000 (10:32 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 19 Oct 2018 00:47:45 +0000 (09:47 +0900)
We have raised the compiler requirement from time to time.
With commit cafa0010cd51 ("Raise the minimum required gcc version
to 4.6"), the minimum for GCC is 4.6 now.

This flag was added by GCC 4.6, and it is recognized by ICC as well.

It is true that Clang does not support this flag but this commit is
just touching the else part of the "ifeq ($(cc-name),clang)" check.
Hence, Clang build is not affected.

Let's rip off the cc-disable-warning switch, and see if somebody
complains about it.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Makefile

index d4343739490fbc7c3f7c41707e3fb25ecac52085..6523ab53f1783143cce4a86b3b8998fdab28f2b5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -723,7 +723,7 @@ else
 
 # These warnings generated too much noise in a regular build.
 # Use make W=1 to enable them (see scripts/Makefile.extrawarn)
-KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
+KBUILD_CFLAGS += -Wno-unused-but-set-variable
 endif
 
 KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable)