From 76441bc4bf8ecda1595437988ff535a0a029fdf8 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Tue, 2 Apr 2013 13:32:21 +0200 Subject: [PATCH] disable unused-but-set-variable warning This warning happens all the time ... Signed-off-by: Johannes Berg --- plumbing/Makefile.kernel | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plumbing/Makefile.kernel b/plumbing/Makefile.kernel index 53af43ef7ff6..77ed2cf4a29f 100644 --- a/plumbing/Makefile.kernel +++ b/plumbing/Makefile.kernel @@ -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/ -- 2.30.2