soc/intel/alderlake/hsphy.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: Id0baf970dbe94a8ebf75f8dbabc6abe345d1c454
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76783
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
diff --git a/src/soc/intel/alderlake/hsphy.c b/src/soc/intel/alderlake/hsphy.c
index 5333a8b..005d851 100644
--- a/src/soc/intel/alderlake/hsphy.c
+++ b/src/soc/intel/alderlake/hsphy.c
@@ -34,13 +34,13 @@
uint32_t hsphy_size;
uint8_t hash_algo;
uint8_t digest[MAX_HASH_SIZE];
- uint8_t hsphy_fw[0];
+ uint8_t hsphy_fw[];
} __packed;
struct ip_push_model {
uint16_t count;
uint16_t address;
- uint32_t data[0];
+ uint32_t data[];
} __packed;
static int heci_get_hsphy_payload(void *buf, uint32_t *buf_size, uint8_t *hash_buf,