mbox series

[0/9] Kbuild: warning options cleanup and more warnings

Message ID 20230811140327.3754597-1-arnd@kernel.org (mailing list archive)
Headers show
Series Kbuild: warning options cleanup and more warnings | expand

Message

Arnd Bergmann Aug. 11, 2023, 2:03 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

This is a series I've had in my randconfig test tree for a long
time, and I'd like to get these patches applied in mainline so I
can stop rebasing them on top of other changes, as well as get
fewer regressions.

There are roughly three groups of changes in here:

1. Clean up the Makefile and Makefile.extrawarn to be organized
   more logically so we can see which warnings are actually enabled
   at which level

2. Enable some of the warnings that have traditionally been disabled
   at either the W=1 or W=2 levels where they arguably should have
   been to start with

3. Enable some of the W=1 warnings by default now that the warnings
   we got in the past have been addressed.

I sent the -Wmissing-prototypes enablement separately, since that is
really the big one that probably found the most bugs but also still
caused the most warnings until my recent cleanups.

Along the same lines as that other series, I would hope that we
can get the first eight patches into the merge window, but should
probably give the last patch another release in linux-next before
any remaining output has been addressed and we can apply it.

     Arnd

Arnd Bergmann (9):
  Kbuild: only pass -fno-inline-functions-called-once for gcc
  Kbuild: consolidate warning flags in scripts/Makefile.extrawarn
  Kbuild: avoid duplicate warning options
  extrawarn: don't turn off -Wshift-negative-value for gcc-9
  extrawarn: enable format and stringop overflow warnings in W=1
  extrawarn: move -Wrestrict into W=1 warnings
  extrawarn: do not disable -Wmain at W=1 level
  extrawarn: enable more warnings in W=2
  [RFC] extrawarn: enable more W=1 warnings by default

 Makefile                   |  90 +------------------------
 scripts/Makefile.extrawarn | 133 ++++++++++++++++++++++++++++++++-----
 2 files changed, 118 insertions(+), 105 deletions(-)