mirror of https://gitee.com/openkylin/qemu.git
openbios: do not error-out array-bounds warning
gcc-12.2 produces an apparently wrong warning for this file: roms/openbios/arch/ppc/qemu/init.c:400:10: error: \ array subscript 0 is outside array bounds of ‘uint32_t[0]’ {aka ‘unsigned int[]’} \ [-Werror=array-bounds] 400 | *dsi = 0x48002002; | =====^=========== Turn this particular -Werror back into warning. Gcc is apparently wrong here. index e40385a70b..2e214aa079 100644 Gbp-Pq: Name openbios-array-bounds-gcc12.patch Signed-off-by: Cong Liu <liucong2@kylinos.cn>
This commit is contained in:
parent
4b3985ec1c
commit
d950231899
|
@ -396,6 +396,9 @@ ppc64_patch_handlers(void)
|
|||
uint32_t *dsi = (uint32_t *)0x300UL;
|
||||
uint32_t *isi = (uint32_t *)0x400UL;
|
||||
|
||||
#pragma GCC diagnostic warning "-Warray-bounds"
|
||||
/* gcc-12 misreports array-bounds error in the following two assignments: */
|
||||
|
||||
// Patch the first DSI handler instruction to: ba 0x2000
|
||||
*dsi = 0x48002002;
|
||||
|
||||
|
|
Loading…
Reference in New Issue