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 <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76777 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user