Re: [PATCH] s390: disable -Warray-bounds

Linus Torvalds
2022-06-09T18:52:02Z

On Thu, Jun 9, 2022 at 7:55 AM Nathan Chancellor <nathan@kernel.org> wrote:
>
> I think this should be $(CONFIG_CC_NO_ARRAY_BOUNDS)?

Thanks, fixed.

Anyway, in order to deal with the (few - the rc2 week does tend to be
small) pull requests I have pending, I have basically worked around
all the new warnings I see.

Some of the workarounds are the proper fixes, but mostly it's a pretty
harsh "just shut that warning up". That includes for things that have
proper fixes pending (ie the netfs issue), where I just did a pretty
ugly but very localized

#pragma GCC diagnostic ignored "-Wattribute-warning"

in the affected files.

End result: I have a clean 'allmodconfig' build again, and hopefully
most of these workarounds can either be tightened up or removed
entirely at some point.

It's this in my tree now:

507160f46c55 ("netfs: gcc-12: temporarily disable
'-Wattribute-warning' for now")
f0be87c42cbd ("gcc-12: disable '-Warray-bounds' universally for now")
842c3b3ddc5f ("mellanox: mlx5: avoid uninitialized variable
warning with gcc-12")
49beadbd47c2 ("gcc-12: disable '-Wdangling-pointer' warning for now")
7aefd8b53815 ("drm: imx: fix compiler warning with gcc-12")
6bfb56e93bce ("cert host tools: Stop complaining about deprecated
OpenSSL functions")

in case people care.

Linus