History

kbuild: Demote 'sign-compare' warning to W=2

Ideally, a kernel compile with W=1 enabled should complete cleanly; however, when we run one currently we are presented with ~25k warnings. 'sign-compare' accounts for ~22k of those ~25k. In this patch we're demoting 'sign-compare' warnings to W=2, with a view to fixing the remaining 3k W=1 warnings required for a clean build. Arnd adds: "As per our discussion, I'd add that this was inadvertedly introduced by Behan when he moved the clang specific warnings into an ifdef block and did not notice that -Wsign-compare was interpreted by both gcc and clang. Earlier, it was introduced in just the same way by Jan-Simon as part of 3d3d6b847420 ("kbuild: LLVMLinux: Adapt warnings for compilation with clang")."

Lee Jones committed 10 years ago

Commit 7599ea81 parent 40ab87a1 file · +2 −0Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/Makefile.extrawarn+2−0
@@ -25,6 +25,7 @@ warning-1 += -Wold-style-definition · 24 unmodified lines
25warning-1 += $(call cc-option, -Wmissing-include-dirs)25warning-1 += $(call cc-option, -Wmissing-include-dirs)
26warning-1 += $(call cc-option, -Wunused-but-set-variable)26warning-1 += $(call cc-option, -Wunused-but-set-variable)
27warning-1 += $(call cc-disable-warning, missing-field-initializers)27warning-1 += $(call cc-disable-warning, missing-field-initializers)
28warning-1 += $(call cc-disable-warning, sign-compare)
28 29
29warning-2 := -Waggregate-return30warning-2 := -Waggregate-return
30warning-2 += -Wcast-align31warning-2 += -Wcast-align
@@ -33,6 +34,7 @@ warning-2 += -Wnested-externs · 2 unmodified lines
33warning-2 += -Wshadow34warning-2 += -Wshadow
34warning-2 += $(call cc-option, -Wlogical-op)35warning-2 += $(call cc-option, -Wlogical-op)
35warning-2 += $(call cc-option, -Wmissing-field-initializers)36warning-2 += $(call cc-option, -Wmissing-field-initializers)
37warning-2 += $(call cc-option, -Wsign-compare)
36 38
37warning-3 := -Wbad-function-cast39warning-3 := -Wbad-function-cast
38warning-3 += -Wcast-qual40warning-3 += -Wcast-qual