From 3a48e52dfe54da42f6d35800f0c2af89708cf94e Mon Sep 17 00:00:00 2001 From: Elyes Haouas Date: Fri, 28 Jul 2023 06:22:38 +0200 Subject: include/commonlib/bsd/mem_chip_info.h: 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: Ia1d597c0e3e86db8c13829e58a8a27d9de1480b4 Signed-off-by: Elyes Haouas Reviewed-on: https://review.coreboot.org/c/coreboot/+/76788 Reviewed-by: Arthur Heymans Tested-by: build bot (Jenkins) --- src/commonlib/bsd/include/commonlib/bsd/mem_chip_info.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commonlib/bsd/include/commonlib/bsd/mem_chip_info.h b/src/commonlib/bsd/include/commonlib/bsd/mem_chip_info.h index bcc15a1f8c..5d4d37c486 100644 --- a/src/commonlib/bsd/include/commonlib/bsd/mem_chip_info.h +++ b/src/commonlib/bsd/include/commonlib/bsd/mem_chip_info.h @@ -86,7 +86,7 @@ struct mem_chip_info { uint8_t manufacturer_id; /* raw value from MR5 */ uint8_t revision_id[2]; /* raw values from MR6 and MR7 */ uint8_t serial_id[8]; /* LPDDR5 only (set to 0 otherwise), MR47 - MR54 */ - } entries[0]; + } entries[]; }; static inline size_t mem_chip_info_size(int entries) -- cgit v1.2.3