From a8a0d394ddc66b82c109af4f2be8ddd53635cd1a Mon Sep 17 00:00:00 2001 From: Elyes Haouas Date: Fri, 28 Jul 2023 06:12:08 +0200 Subject: sb/intel/lynxpoint/me: 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: If31cbc5ae184c4eb66011666c1bb655fa16afba0 Signed-off-by: Elyes Haouas Reviewed-on: https://review.coreboot.org/c/coreboot/+/76781 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans --- src/southbridge/intel/lynxpoint/me.c | 2 +- src/southbridge/intel/lynxpoint/me.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/southbridge/intel/lynxpoint') diff --git a/src/southbridge/intel/lynxpoint/me.c b/src/southbridge/intel/lynxpoint/me.c index d076f0ff87..b0d98d4c2b 100644 --- a/src/southbridge/intel/lynxpoint/me.c +++ b/src/southbridge/intel/lynxpoint/me.c @@ -723,7 +723,7 @@ static u32 me_to_host_words_pending(void) struct mbp_payload { union mbp_header header; - u32 data[0]; + u32 data[]; }; /* diff --git a/src/southbridge/intel/lynxpoint/me.h b/src/southbridge/intel/lynxpoint/me.h index 6990322651..489fc6dc46 100644 --- a/src/southbridge/intel/lynxpoint/me.h +++ b/src/southbridge/intel/lynxpoint/me.h @@ -462,7 +462,7 @@ struct mbp_icc_profile { u8 icc_profile_index; u8 reserved; u32 icc_reg_bundles; - struct icc_address_mask icc_address_mask[0]; + struct icc_address_mask icc_address_mask[]; } __packed; struct tdt_state_flag { -- cgit v1.2.3