OSDN Git Service

gcc-10: disable 'zero-length-bounds' warning for now
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 9 May 2020 21:30:29 +0000 (14:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 May 2020 06:18:46 +0000 (08:18 +0200)
commit7f43fca7ea249ec9e903c378060dff4a5ef4f8b6
tree9722d48d6b8eebc0390bf4e8e4d3f42ac0585209
parentec22322218eca4c9fcafdbbf293a0f8faabfb2cb
gcc-10: disable 'zero-length-bounds' warning for now

commit 5c45de21a2223fe46cf9488c99a7fbcf01527670 upstream.

This is a fine warning, but we still have a number of zero-length arrays
in the kernel that come from the traditional gcc extension.  Yes, they
are getting converted to flexible arrays, but in the meantime the gcc-10
warning about zero-length bounds is very verbose, and is hiding other
issues.

I missed one actual build failure because it was hidden among hundreds
of lines of warning.  Thankfully I caught it on the second go before
pushing things out, but it convinced me that I really need to disable
the new warnings for now.

We'll hopefully be all done with our conversion to flexible arrays in
the not too distant future, and we can then re-enable this warning.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Makefile