Re: arch/m68k/include/asm/raw_io.h:91:13: warning: array subscript 0 is outside array bounds of 'volatile u16[0]' {aka 'volatile short unsigned int[]'}

From: Guenter Roeck
Date: Wed Sep 20 2023 - 17:09:05 EST


On 9/20/23 09:20, Rob Herring wrote:
[....]


Sure, but I still argue that this isn't worth it for drivers like this one.
Are you going to submit a fix ? Because otherwise I'll submit a patch
to drop COMPILE_TEST from MACHZ_WDT.

I honestly don't know what the fix is. There's a compiler flag to
allow 0 address, but that seems like a big hammer. From what I read on
the fix for gcc-12, we shouldn't be getting this, but I haven't
confirmed. I was hoping for comment from Geert as the issue doesn't
appear to be the driver, but the arch code.

Furthermore, I just built the same HEAD and config as reported and
don't see this error. I'm using kernel.org nolibc gcc 13.2.0 which
should be the same version.


Exactly my point. So now we are stuck with a report like this on a
driver which probably has 0 users and we don't know how to fix it,
all to get the benefit of being able to compile it for an architecture
and platform which will never use it.

I seem to recall similar errors with m68k and COMPILE_TEST last time
I tried to enable it on watchdog drivers, so I am not sure if this is
entirely new.

Guenter