diff options
author | Elyes Haouas <ehaouas@noos.fr> | 2023-07-27 19:07:58 +0200 |
---|---|---|
committer | Elyes Haouas <ehaouas@noos.fr> | 2023-07-30 09:57:43 +0000 |
commit | 8843b6fe1d6bd02c3316bf83216ef473ab3aa653 (patch) | |
tree | 45a06bb0360faf555e3783ae62c4851b780ebe6b | |
parent | 1a02f0935ae6a6d480feef27b59ae2ae139d2d61 (diff) |
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>
-rw-r--r-- | src/include/sar.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/include/sar.h b/src/include/sar.h index 87edf1a5b7..8d712dec81 100644 --- a/src/include/sar.h +++ b/src/include/sar.h @@ -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 */ |