[PATCH 2/5] Makefile: disable unused-but-set-variable warning

Sascha Hauer s.hauer at pengutronix.de
Mon Jan 2 08:57:11 EST 2012


This produces too many false positives.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 Makefile |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index b6e4c0c..d96fc88 100644
--- a/Makefile
+++ b/Makefile
@@ -450,6 +450,10 @@ endif
 # Force gcc to behave correct even for buggy distributions
 CFLAGS          += $(call cc-option, -fno-stack-protector)
 
+# This warning generated too much noise in a regular build.
+# Use make W=1 to enable this warning (see scripts/Makefile.build)
+CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
+
 # arch Makefile may override CC so keep this after arch Makefile is included
 NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
 CHECKFLAGS     += $(NOSTDINC_FLAGS)
-- 
1.7.7.3




More information about the barebox mailing list