From 32b86071cfa4e3ca1c3cf33e8f0fc6f6c9a45dc2 Mon Sep 17 00:00:00 2001 From: Qu Wenruo Date: Wed, 5 Dec 2018 14:40:08 +0800 Subject: [PATCH] btrfs-progs: Makefile.extrawarn: Don't warn on sign compare Under most case, we are just using 'int' for 'unsigned int', and doesn't care about the sign. The -Wsign-compare warning is causing tons of false alerts. Suppressing it makes W=1 less noisy so we can focus on real problems, while still allowing it in W=3 build. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba --- Makefile.extrawarn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile.extrawarn b/Makefile.extrawarn index e084ac61..0c483785 100644 --- a/Makefile.extrawarn +++ b/Makefile.extrawarn @@ -53,6 +53,7 @@ warning-1 += $(call cc-option, -Wmissing-include-dirs) warning-1 += $(call cc-option, -Wunused-but-set-variable) warning-1 += $(call cc-disable-warning, missing-field-initializers) warning-1 += $(call cc-disable-warning, format-truncation) +warning-1 += $(call cc-disable-warning, sign-compare) warning-2 := -Waggregate-return warning-2 += -Wcast-align @@ -73,6 +74,7 @@ warning-3 += -Wredundant-decls warning-3 += -Wswitch-default warning-3 += $(call cc-option, -Wpacked-bitfield-compat) warning-3 += $(call cc-option, -Wvla) +warning-3 += $(call cc-option, -Wsign-compare) warning := $(warning-$(findstring 1, $(BUILD_ENABLE_EXTRA_GCC_CHECKS))) warning += $(warning-$(findstring 2, $(BUILD_ENABLE_EXTRA_GCC_CHECKS)))