Re: [PATCH v2 2/3] Fix -Werror=array-bounds array subscript 0 is outside array bounds

2022-04-06 Thread Daniel Kiper
On Mon, Mar 28, 2022 at 03:00:53PM +0800, Michael Chang via Grub-devel wrote: > The grub is failing to build with gcc-12 in many places like this: > > In function 'init_cbfsdisk', > inlined from 'grub_mod_init' at ../../grub-core/fs/cbfs.c:391:3: > ../../grub-core/fs/cbfs.c:345:7: error: array

[PATCH v2 2/3] Fix -Werror=array-bounds array subscript 0 is outside array bounds

2022-03-28 Thread Michael Chang via Grub-devel
The grub is failing to build with gcc-12 in many places like this: In function 'init_cbfsdisk', inlined from 'grub_mod_init' at ../../grub-core/fs/cbfs.c:391:3: ../../grub-core/fs/cbfs.c:345:7: error: array subscript 0 is outside array bounds of 'grub_uint32_t[0]' {aka 'unsigned int[]'} [-Wer