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 <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76784 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
		| @@ -55,7 +55,7 @@ struct fsp_patch_table { | |||||||
| 	uint8_t header_revision; | 	uint8_t header_revision; | ||||||
| 	uint8_t reserved; | 	uint8_t reserved; | ||||||
| 	uint32_t patch_entry_num; | 	uint32_t patch_entry_num; | ||||||
| 	uint32_t patch_entries[0]; | 	uint32_t patch_entries[]; | ||||||
| } __packed; | } __packed; | ||||||
|  |  | ||||||
| #define FSPP_SIG 0x50505346 | #define FSPP_SIG 0x50505346 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user