Skip to content

Commit

Permalink
kbuild: add -Wno-unused-but-set-variable flag unconditionally
Browse files Browse the repository at this point in the history
We have raised the compiler requirement from time to time.
With commit cafa001 ("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 <[email protected]>
Reviewed-by: Nick Desaulniers <[email protected]>
  • Loading branch information
masahir0y committed Oct 19, 2018
1 parent a33e7ae commit 9df3e7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9df3e7a

Please sign in to comment.