Message ID | 20181116080040.5941-1-wqu@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | None | expand |
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 <wqu@suse.com> > --- > 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
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
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 <wqu@suse.com> --- changelog: v1.1: Use cc-disable-warning to provide much better compatibility against older compiler --- Makefile.extrawarn | 1 + 1 file changed, 1 insertion(+)