Skip to content

Commit

Permalink
kbuild: Enable -Wuninitialized
Browse files Browse the repository at this point in the history
This helps fine very dodgy behavior through both -Wuninitialized
(warning that a variable is always uninitialized) and
-Wsometimes-uninitialized (warning that a variable is sometimes
uninitialized, like GCC's -Wmaybe-uninitialized). These warnings
catch things that GCC doesn't such as:

https://lore.kernel.org/lkml/86649ee4-9794-77a3-502c-f4cd10019c36@lca.pw/

We very much want to catch these so turn this warning on so that CI is
aware of it.

Link: ClangBuiltLinux/linux#381
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
  • Loading branch information
nathanchance authored and masahir0y committed Jun 23, 2019
1 parent 589834b commit 3a61925
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion scripts/Makefile.extrawarn
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,5 @@ KBUILD_CFLAGS += -Wno-unused-value
KBUILD_CFLAGS += -Wno-format
KBUILD_CFLAGS += -Wno-sign-compare
KBUILD_CFLAGS += -Wno-format-zero-length
KBUILD_CFLAGS += -Wno-uninitialized
endif
endif

0 comments on commit 3a61925

Please sign in to comment.