lib/cbmem_console.c: 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: I3d716b29d8e28584a0c9e4056d4c93dca2873114 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76780 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
a8a0d394dd
commit
7465c16e73
1 changed files with 1 additions and 1 deletions
|
|
@ -28,7 +28,7 @@
|
|||
struct cbmem_console {
|
||||
u32 size;
|
||||
u32 cursor;
|
||||
u8 body[0];
|
||||
u8 body[];
|
||||
} __packed;
|
||||
|
||||
#define MAX_SIZE (1 << 28) /* can't be changed without breaking readers! */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue