aboutsummaryrefslogtreecommitdiff
path: root/payloads/coreinfo
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2023-07-30 17:29:36 +0200
committerJakub Czapiga <jacz@semihalf.com>2023-08-01 12:40:59 +0000
commitb66a5551d587aced837737fff2b0584b74613955 (patch)
treedc70c1adf707b9db4549fe5fd56fb570cb1bd109 /payloads/coreinfo
parent3bb076e5218e437af3e71dd50c85e01963594fe4 (diff)
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>
Diffstat (limited to 'payloads/coreinfo')
-rw-r--r--payloads/coreinfo/bootlog_module.c2
-rw-r--r--payloads/coreinfo/cbfs_module.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/payloads/coreinfo/bootlog_module.c b/payloads/coreinfo/bootlog_module.c
index 5a87f28340..07fa814ed5 100644
--- a/payloads/coreinfo/bootlog_module.c
+++ b/payloads/coreinfo/bootlog_module.c
@@ -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)
diff --git a/payloads/coreinfo/cbfs_module.c b/payloads/coreinfo/cbfs_module.c
index 93c90e7da9..c8fa7e2eb2 100644
--- a/payloads/coreinfo/cbfs_module.c
+++ b/payloads/coreinfo/cbfs_module.c
@@ -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;