From 8843b6fe1d6bd02c3316bf83216ef473ab3aa653 Mon Sep 17 00:00:00 2001 From: Elyes Haouas Date: Thu, 27 Jul 2023 19:07:58 +0200 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76755 Reviewed-by: Arthur Heymans Tested-by: build bot (Jenkins) --- src/include/sar.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') 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 */ -- cgit v1.2.3