From c1700e02faa06eea6be557b8c6a8067bdb24105c Mon Sep 17 00:00:00 2001 From: Elyes Haouas Date: Fri, 28 Jul 2023 06:16:27 +0200 Subject: commonlib/fsp_relocate.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: I52b5a83e7e484889bfef5a4e45a0279fadd58890 Signed-off-by: Elyes Haouas Reviewed-on: https://review.coreboot.org/c/coreboot/+/76784 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans --- src/commonlib/fsp_relocate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/commonlib/fsp_relocate.c b/src/commonlib/fsp_relocate.c index c2c3811ace..c7c4b5a9ef 100644 --- a/src/commonlib/fsp_relocate.c +++ b/src/commonlib/fsp_relocate.c @@ -55,7 +55,7 @@ struct fsp_patch_table { uint8_t header_revision; uint8_t reserved; uint32_t patch_entry_num; - uint32_t patch_entries[0]; + uint32_t patch_entries[]; } __packed; #define FSPP_SIG 0x50505346 -- cgit v1.2.3