Skip to content

kbuild: enable more warnings by default

Arnd Bergmann linux-kbuild lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest6 patches 5 repliesIn review 5 of 6 applied
  2. v14 patches 3 repliesSuperseded

Patches in v3 5 of 6 applied

#Subject and filesSizeRepliesApplied
1/6kbuild: turn on -Wextra by defaultscripts/Makefile.extrawarn+4 -11 replyApplied
2/6kbuild: remove redundant extra warning flagsscripts/Makefile.extrawarn+0 -150 repliesApplied
3/6kbuild: turn on -Wrestrict by defaultscripts/Makefile.extrawarn+0 -12 repliesApplied
4/6kbuild: enable -Wformat-truncation on clangscripts/Makefile.extrawarn+7 -00 repliesApplied
5/6kbuild: enable -Wcast-function-type-strict unconditionallyscripts/Makefile.extrawarn+0 -11 replyApplied
6/6kbuild: enable -Wstringop-truncation globallyscripts/Makefile.extrawarn+0 -11 reply

Reviews trailers per patch

3 of 6 patches have a Reviewed-by or Acked-by.

PatchNathan ChancellorKees Cook
1/6A-b R-b
2/6
3/6
4/6
5/6R-b
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH 0/6] [v3] kbuild: enable more warnings by default

From: Arnd Bergmann <[email protected]>

Hi Andrew,

All the warning fixes I sent for these warnings have been merged into mainline or linux-next, so let's turn them on by default.

Since some of the bugfixes are still in flight in maintainer trees, I have rebased this on top of the mm/mm-nonmm-unstable branch for the purpose of merging these during the second half of the 6.10 merge window.

I did thorough testing of the changes on x86, arm64 and arm, as well as allmodconfig testing across all architectures and compilers. It is still likely that this will catch more warnings that show up in configurations I did not test, or in newly merged code, and I plan to send fixes for those as well.

I also sent patches to enable -Wunused-const-variable and -Wtautological-constant-out-of-range-compare, but those still need additional bugfixes to get merged first.

Arnd Bergmann (6):
[v3] kbuild: turn on -Wextra by default
[v3] kbuild: remove redundant extra warning flags [v3] kbuild: turn on -Wrestrict by default
[v3] kbuild: enable -Wformat-truncation on clang
[v3] kbuild: enable -Wcast-function-type-strict unconditionally [v3] kbuild: enable -Wstringop-truncation globally

 scripts/Makefile.extrawarn | 30 +++++++++++-------------------
 1 file changed, 11 insertions(+), 19 deletions(-)
Signature · 8 lines
2.39.2

Cc: Masahiro Yamada <[email protected]>
Cc: Nathan Chancellor <[email protected]>
Cc: Nicolas Schier <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: [email protected]
Cc: [email protected]