3 @@ -559,6 +559,10 @@ ifndef CONFIG_CC_STACKPROTECTOR
4 KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector)
7 +# This warning generated too much noise in a regular build.
8 +# Use make W=1 to enable this warning (see scripts/Makefile.build)
9 +KBUILD_CFLAGS += $(call cc-option, -Wno-unused-but-set-variable)
11 ifdef CONFIG_FRAME_POINTER
12 KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
14 --- a/scripts/Makefile.build
15 +++ a/scripts/Makefile.build
16 @@ -80,6 +80,7 @@ KBUILD_EXTRA_WARNINGS += -Wredundant-decls
17 KBUILD_EXTRA_WARNINGS += -Wshadow
18 KBUILD_EXTRA_WARNINGS += -Wswitch-default
19 KBUILD_EXTRA_WARNINGS += $(call cc-option, -Wvla,)
20 +KBUILD_EXTRA_WARNINGS += $(call cc-option, -Wunused-but-set-variable)
21 KBUILD_CFLAGS += $(KBUILD_EXTRA_WARNINGS)