diff --git a/Makefile b/Makefile index 41ea6fb..842af69 100644 --- a/Makefile +++ b/Makefile @@ -559,6 +559,10 @@ ifndef CONFIG_CC_STACKPROTECTOR KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) endif +# This warning generated too much noise in a regular build. +# Use make W=1 to enable this warning (see scripts/Makefile.build) +KBUILD_CFLAGS += $(call cc-option, -Wno-unused-but-set-variable) + ifdef CONFIG_FRAME_POINTER KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls else diff --git a/scripts/Makefile.build b/scripts/Makefile.build index d5f925a..c81dde2 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -80,6 +80,7 @@ KBUILD_EXTRA_WARNINGS += -Wredundant-decls KBUILD_EXTRA_WARNINGS += -Wshadow KBUILD_EXTRA_WARNINGS += -Wswitch-default KBUILD_EXTRA_WARNINGS += $(call cc-option, -Wvla,) +KBUILD_EXTRA_WARNINGS += $(call cc-option, -Wunused-but-set-variable) KBUILD_CFLAGS += $(KBUILD_EXTRA_WARNINGS) endif