include/sar.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: I688bef264ff41b2a9755133698880fa397f652d4
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76755
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/src/include/sar.h b/src/include/sar.h
index 87edf1a..8d712de 100644
--- a/src/include/sar.h
+++ b/src/include/sar.h
@@ -22,7 +22,7 @@
uint8_t revision;
uint8_t chains_count;
uint8_t bands_count;
- uint8_t wgds_table[0];
+ uint8_t wgds_table[];
} __packed;
struct sar_profile {
@@ -30,7 +30,7 @@
uint8_t dsar_set_count;
uint8_t chains_count;
uint8_t subbands_count;
- uint8_t sar_table[0];
+ uint8_t sar_table[];
} __packed;
struct gain_profile {
@@ -38,7 +38,7 @@
uint8_t mode;
uint8_t chains_count;
uint8_t bands_count;
- uint8_t ppag_table[0];
+ uint8_t ppag_table[];
} __packed;
struct avg_profile {
@@ -62,7 +62,7 @@
struct sar_header {
char marker[SAR_STR_PREFIX_SIZE];
uint8_t version;
- uint16_t offsets[0];
+ uint16_t offsets[];
} __packed;
/* Wifi SAR limit table structure */