summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2023-07-28 06:12:08 +0200
committerElyes Haouas <ehaouas@noos.fr>2023-07-30 09:59:33 +0000
commita8a0d394ddc66b82c109af4f2be8ddd53635cd1a (patch)
treeb8ee282a3b26e61b1da82610871acd89399db18c
parent3a48e52dfe54da42f6d35800f0c2af89708cf94e (diff)
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 <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76781 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
-rw-r--r--src/southbridge/intel/lynxpoint/me.c2
-rw-r--r--src/southbridge/intel/lynxpoint/me.h2
2 files changed, 2 insertions, 2 deletions
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 {