From 19b534d5fd0595393a6e88d8c7a0eee8b17feda1 Mon Sep 17 00:00:00 2001 From: Elyes Haouas Date: Fri, 28 Jul 2023 06:04:46 +0200 Subject: include/imd_private.h: 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: I53ffa4b35d35d4f8b0170377041b258d4bd2eeeb Signed-off-by: Elyes Haouas Reviewed-on: https://review.coreboot.org/c/coreboot/+/76777 Reviewed-by: Arthur Heymans Tested-by: build bot (Jenkins) --- src/include/imd_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/include/imd_private.h b/src/include/imd_private.h index 7b9a2778ab..3ff6a518aa 100644 --- a/src/include/imd_private.h +++ b/src/include/imd_private.h @@ -28,7 +28,7 @@ struct imd_root { uint32_t entry_align; /* Used for fixing the size of an imd. Relative to the root. */ int32_t max_offset; - struct imd_entry entries[0]; + struct imd_entry entries[]; } __packed; #define IMD_ROOT_PTR_MAGIC 0xc0389481 -- cgit v1.2.3