Re: [PATCH v1.1 3/9] btrfs-progs: Makefile.extrawarn: Don't warn on sign compare

2018-12-04 Thread David Sterba
On Fri, Nov 16, 2018 at 04:00:40PM +0800, Qu Wenruo wrote:
> Under most case, we are just using 'int' for 'unsigned int', and doesn't
> care about the sign.
> 
> The Wsign-compare is causing tons of false alerts.
> Suppressing it would make W=1 less noisy.
> 
> Signed-off-by: Qu Wenruo 
> ---
> changelog:
> v1.1:
>Use cc-disable-warning to provide much better compatibility against
>older compiler
> ---
>  Makefile.extrawarn | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Makefile.extrawarn b/Makefile.extrawarn
> index bbb2d5173846..736bee82759f 100644
> --- a/Makefile.extrawarn
> +++ b/Makefile.extrawarn
> @@ -54,6 +54,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)

Please enable it for W=3


[PATCH v1.1 3/9] btrfs-progs: Makefile.extrawarn: Don't warn on sign compare

2018-11-16 Thread Qu Wenruo
Under most case, we are just using 'int' for 'unsigned int', and doesn't
care about the sign.

The Wsign-compare is causing tons of false alerts.
Suppressing it would make W=1 less noisy.

Signed-off-by: Qu Wenruo 
---
changelog:
v1.1:
   Use cc-disable-warning to provide much better compatibility against
   older compiler
---
 Makefile.extrawarn | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Makefile.extrawarn b/Makefile.extrawarn
index bbb2d5173846..736bee82759f 100644
--- a/Makefile.extrawarn
+++ b/Makefile.extrawarn
@@ -54,6 +54,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
-- 
2.19.1