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
Unified · Split
| @@ -567,6 +567,10 @@ ifndef CONFIG_CC_STACKPROTECTOR · 566 unmodified lines | |||
| 567 | KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) | 567 | KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) |
| 568 | endif | 568 | endif |
| 569 | 569 | ||
| 570 | # This warning generated too much noise in a regular build. | ||
| 571 | # Use make W=1 to enable this warning (see scripts/Makefile.build) | ||
| 572 | KBUILD_CFLAGS += $(call cc-option, -Wno-unused-but-set-variable) | ||
| 573 | |||
| 570 | ifdef CONFIG_FRAME_POINTER | 574 | ifdef CONFIG_FRAME_POINTER |
| 571 | KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls | 575 | KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls |
| 572 | else | 576 | else |
| @@ -66,6 +66,7 @@ warning-1 += -Wmissing-format-attribute · 65 unmodified lines | |||
| 66 | warning-1 += -Wmissing-prototypes | 66 | warning-1 += -Wmissing-prototypes |
| 67 | warning-1 += -Wold-style-definition | 67 | warning-1 += -Wold-style-definition |
| 68 | warning-1 += $(call cc-option, -Wmissing-include-dirs) | 68 | warning-1 += $(call cc-option, -Wmissing-include-dirs) |
| 69 | warning-1 += $(call cc-option, -Wunused-but-set-variable) | ||
| 69 | 70 | ||
| 70 | warning-2 := -Waggregate-return | 71 | warning-2 := -Waggregate-return |
| 71 | warning-2 += -Wcast-align | 72 | warning-2 += -Wcast-align |