From b39abc7bab854c0cd923db778c80f9e67b85f51f Mon Sep 17 00:00:00 2001 From: Elyes Haouas Date: Fri, 28 Jul 2023 06:15:03 +0200 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76783 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans Reviewed-by: Felix Singer --- src/soc/intel/alderlake/hsphy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/soc/intel/alderlake/hsphy.c b/src/soc/intel/alderlake/hsphy.c index 5333a8bf2f..005d85149f 100644 --- a/src/soc/intel/alderlake/hsphy.c +++ b/src/soc/intel/alderlake/hsphy.c @@ -34,13 +34,13 @@ struct hsphy_cache { 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, -- cgit v1.2.3