summaryrefslogtreecommitdiffstats
path: root/src/commonlib
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2023-07-28 06:22:38 +0200
committerElyes Haouas <ehaouas@noos.fr>2023-07-30 09:59:21 +0000
commit3a48e52dfe54da42f6d35800f0c2af89708cf94e (patch)
tree667d2e883544e23bc7c9fca37e6c501045dd1982 /src/commonlib
parentc1700e02faa06eea6be557b8c6a8067bdb24105c (diff)
downloadcoreboot-3a48e52dfe54da42f6d35800f0c2af89708cf94e.tar.gz
coreboot-3a48e52dfe54da42f6d35800f0c2af89708cf94e.tar.bz2
coreboot-3a48e52dfe54da42f6d35800f0c2af89708cf94e.zip
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 <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76788 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/commonlib')
-rw-r--r--src/commonlib/bsd/include/commonlib/bsd/mem_chip_info.h2
1 files changed, 1 insertions, 1 deletions
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 bcc15a1f8c81..5d4d37c48690 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)