Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Makefile: Move -Wno-unused-but-set-variable out of GCC only block

Currently, -Wunused-but-set-variable is only supported by GCC so it is
disabled unconditionally in a GCC only block (it is enabled with W=1).
clang currently has its implementation for this warning in review so
preemptively move this statement out of the GCC only block and wrap it
with cc-disable-warning so that both compilers function the same.

Cc: stable@vger.kernel.org
Link: https://reviews.llvm.org/D100581
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

authored by

Nathan Chancellor and committed by
Masahiro Yamada
885480b0 1476fee5

+4 -4
+4 -4
Makefile
··· 792 792 KBUILD_CFLAGS += -mno-global-merge 793 793 else 794 794 795 - # These warnings generated too much noise in a regular build. 796 - # Use make W=1 to enable them (see scripts/Makefile.extrawarn) 797 - KBUILD_CFLAGS += -Wno-unused-but-set-variable 798 - 799 795 # Warn about unmarked fall-throughs in switch statement. 800 796 # Disabled for clang while comment to attribute conversion happens and 801 797 # https://github.com/ClangBuiltLinux/linux/issues/636 is discussed. 802 798 KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough,) 803 799 endif 800 + 801 + # These warnings generated too much noise in a regular build. 802 + # Use make W=1 to enable them (see scripts/Makefile.extrawarn) 803 + KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable) 804 804 805 805 KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable) 806 806 ifdef CONFIG_FRAME_POINTER