On 5/2/22 09:37, Michael Tokarev wrote:

pvh_main.c: In function ‘pvh_load_kernel’:
pvh_main.c:101:42: warning: array subscript 0 is outside array bounds of ‘uint16_t[0]’ {aka ‘short unsigned int[]’} [-Warray-bounds]    101 |         uint32_t ebda_paddr = ((uint32_t)*((uint16_t *)EBDA_BASE_ADDR)) << 4;        | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To me it looks like we should try to fix this particular expression
to make it more "compiler-friendly" than to disable warning for the
whole thing.

I think this is really a compiler bug, or alternatively this case should be extracted to its own -W flag.

Which compiler (version) does this?

The GCC 12.0.1 prerelease.

Paolo

Reply via email to