]> xenbits.xensource.com Git - xen.git/commitdiff
xen: Add -Wno-unused-value to the clang CFLAGS
authorTim Deegan <tim@xen.org>
Wed, 11 Apr 2012 12:10:33 +0000 (13:10 +0100)
committerTim Deegan <tim@xen.org>
Wed, 11 Apr 2012 12:10:33 +0000 (13:10 +0100)
clang complains about a lot of functions and macros whose return value
is unused.  I started on patches to drop some functions' return values
and scatter (void)s around callers, but it was getting too messy.
Just turn off the warning instead.

Signed-off-by: Tim Deegan <tim@xen.org>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
Config.mk

index 796fb8caae71f3405e3a4ca5f37f900d9254926f..0dc2d8e650d664de65e812d2a1905be646c20689 100644 (file)
--- a/Config.mk
+++ b/Config.mk
@@ -159,7 +159,8 @@ CFLAGS += -Wall -Wstrict-prototypes
 
 # Clang complains about macros that expand to 'if ( ( foo == bar ) ) ...'
 # and is over-zealous with the printf format lint
-CFLAGS-$(clang) += -Wno-parentheses -Wno-format
+# and is a bit too fierce about unused return values
+CFLAGS-$(clang) += -Wno-parentheses -Wno-format -Wno-unused-value
 
 $(call cc-option-add,HOSTCFLAGS,HOSTCC,-Wdeclaration-after-statement)
 $(call cc-option-add,CFLAGS,CC,-Wdeclaration-after-statement)