From 737defd3a53fbdc0e1a90b50ad7df145ac10adbe Mon Sep 17 00:00:00 2001 From: Qu Wenruo Date: Wed, 5 Dec 2018 14:40:06 +0800 Subject: [PATCH] btrfs-progs: Makefile.extrawarn: Import cc-disable-warning We imported cc-option but forgot to import cc-disable-warning. Fixes: b556a992c3ad ("btrfs-progs: build: allow to build with various compiler warnings") Signed-off-by: Qu Wenruo Signed-off-by: David Sterba --- Makefile.extrawarn | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile.extrawarn b/Makefile.extrawarn index 1f4bda94..9c88950e 100644 --- a/Makefile.extrawarn +++ b/Makefile.extrawarn @@ -19,6 +19,11 @@ try-run = $(shell set -e; \ cc-option = $(call try-run,\ $(CC) $(CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2)) +# cc-disable-warning +# Usage: cflags-y += $(call cc-disable-warning,unused-but-set-variable) +cc-disable-warning = $(call try-run, \ + $(CC) -Werror $(CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1))) + # From linux.git/scripts/Makefile.extrawarn # ========================================================================== #