payloads/coreinfo: Use C99 flexible arrays
Use C99 flexible arrays instead of older style of one-element or zero-length arrays. It allows the compiler to generate errors when the flexible array does not occur at the end in the structure. Change-Id: I17811256b04a17539d3ed77f406892ae77e97515 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76848 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
3bb076e521
commit
b66a5551d5
|
@ -17,7 +17,7 @@ static s32 g_max_cursor_line = 0;
|
|||
struct cbmem_console {
|
||||
u32 size;
|
||||
u32 cursor;
|
||||
u8 body[0];
|
||||
u8 body[];
|
||||
} __packed;
|
||||
|
||||
#define CURSOR_MASK ((1 << 28) - 1)
|
||||
|
|
|
@ -31,7 +31,7 @@ struct cbheader {
|
|||
u32 align;
|
||||
u32 offset;
|
||||
u32 architecture;
|
||||
u32 pad[1];
|
||||
u32 pad[];
|
||||
} __packed;
|
||||
|
||||
struct cbfile {
|
||||
|
@ -40,7 +40,7 @@ struct cbfile {
|
|||
u32 type;
|
||||
u32 checksum;
|
||||
u32 offset;
|
||||
char filename[0];
|
||||
char filename[];
|
||||
} __packed;
|
||||
|
||||
static int filecount = 0, selected = 0, start_row = 0;
|
||||
|
|
Loading…
Reference in New Issue