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>
This commit is contained in:
parent
1a02f0935a
commit
8843b6fe1d
|
@ -22,7 +22,7 @@ struct geo_profile {
|
|||
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 @@ struct sar_profile {
|
|||
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 @@ struct gain_profile {
|
|||
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 dsm_profile {
|
|||
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 */
|
||||
|
|
Loading…
Reference in New Issue