Jakub Czapiga has submitted this change. ( https://review.coreboot.org/c/coreboot/+/76851?usp=email )
Change subject: payloads/libpayload/include/coreboot_tables: Use C99 flexible arrays ......................................................................
payloads/libpayload/include/coreboot_tables: 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: Icf3da1b0a0666769ae7b5d5f641b85436b324b4c Signed-off-by: Elyes Haouas ehaouas@noos.fr Reviewed-on: https://review.coreboot.org/c/coreboot/+/76851 Reviewed-by: Felix Singer service+coreboot-gerrit@felixsinger.de Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M payloads/libpayload/include/coreboot_tables.h 1 file changed, 7 insertions(+), 7 deletions(-)
Approvals: Felix Singer: Looks good to me, approved build bot (Jenkins): Verified
diff --git a/payloads/libpayload/include/coreboot_tables.h b/payloads/libpayload/include/coreboot_tables.h index 5f6a223..4502e34 100644 --- a/payloads/libpayload/include/coreboot_tables.h +++ b/payloads/libpayload/include/coreboot_tables.h @@ -125,7 +125,7 @@ struct cb_memory { u32 tag; u32 size; - struct cb_memory_range map[0]; + struct cb_memory_range map[]; };
struct cb_hwrpb { @@ -139,7 +139,7 @@ u32 size; u8 vendor_idx; u8 part_number_idx; - u8 strings[0]; + u8 strings[]; };
enum type_c_orientation { @@ -166,13 +166,13 @@
struct type_c_info { u32 port_count; - struct type_c_port_info port_info[0]; + struct type_c_port_info port_info[]; };
struct cb_string { u32 tag; u32 size; - u8 string[0]; + u8 string[]; };
struct cb_serial { @@ -255,7 +255,7 @@ u32 size;
u32 count; - struct cb_gpio gpios[0]; + struct cb_gpio gpios[]; };
struct cb_pcie { @@ -305,7 +305,7 @@ * space and host address space. This determines the number of entries in mmap_table. */ uint32_t mmap_count; - struct flash_mmap_window mmap_table[0]; + struct flash_mmap_window mmap_table[]; };
struct cb_boot_media_params { @@ -344,7 +344,7 @@ uint32_t tag; uint32_t size; uint32_t count; - struct mac_address mac_addrs[0]; + struct mac_address mac_addrs[]; };
struct cb_mmc_info {