libpayload/drivers/cbmem_console: 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: I3fd3f068ff731e1d9fed7c38ba6815e1eed86450 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76849 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
This commit is contained in:
committed by
Jakub Czapiga
parent
ae51ee8c95
commit
3bb076e521
@@ -32,7 +32,7 @@
|
||||
struct cbmem_console {
|
||||
uint32_t size;
|
||||
uint32_t cursor;
|
||||
uint8_t body[0];
|
||||
uint8_t body[];
|
||||
} __packed;
|
||||
|
||||
#define CURSOR_MASK ((1 << 28) - 1)
|
||||
|
Reference in New Issue
Block a user