disable unused-but-set-variable warning
authorJohannes Berg <johannes@sipsolutions.net>
Tue, 2 Apr 2013 11:32:21 +0000 (13:32 +0200)
committerJohannes Berg <johannes@sipsolutions.net>
Tue, 2 Apr 2013 11:32:21 +0000 (13:32 +0200)
This warning happens all the time ...

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
plumbing/Makefile.kernel

index 53af43ef7ff6158bc100de4f61c8ea7ac9bd191d..77ed2cf4a29f6d83bacd24a4fe88b0188a763982 100644 (file)
@@ -1,8 +1,14 @@
+# Since 2.6.21, try-run is available, but cc-disable-warning
+# was only added later, so we add it here ourselves:
+backport-cc-disable-warning = $(call try-run,\
+       $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1)))
+
 NOSTDINC_FLAGS := \
        -I$(M)/include/ \
        -I$(M)/include/uapi \
        -I$(M)/include/drm \
        -include $(M)/include/linux/compat-2.6.h \
+       $(call backport-cc-disable-warning, unused-but-set-variable) \
        $(CFLAGS)
 
 obj-y += compat/