From: Dave Jones Date: Thu, 21 Apr 2011 21:28:13 +0000 (-0400) Subject: kbuild: Disable -Wunused-but-set-variable for gcc 4.6.0 X-Git-Tag: v2.6.32.49~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=126a2f643ee673c6dfdf782fc84ffb400bd3c4c5;p=thirdparty%2Fkernel%2Fstable.git kbuild: Disable -Wunused-but-set-variable for gcc 4.6.0 commit af0e5d565d2fffcd97d1e2d89669d627cc04e8b8 upstream. Disable the new -Wunused-but-set-variable that was added in gcc 4.6.0 It produces more false positives than useful warnings. This can still be enabled using W=1 [gregkh - No it can not for 2.6.32, but we don't care] Signed-off-by: Dave Jones Acked-by: Sam Ravnborg Tested-by: Sam Ravnborg Signed-off-by: Michal Marek Signed-off-by: Greg Kroah-Hartman --- diff --git a/Makefile b/Makefile index 400a175f9a068..3cc6d4f68608c 100644 --- a/Makefile +++ b/Makefile @@ -537,6 +537,9 @@ ifndef CONFIG_CC_STACKPROTECTOR KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) endif +# This warning generated too much noise in a regular 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