util: 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: I6b87680ec9f501945ae266ae4e4927efd2399d56
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76815
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Elyes Haouas
2023-07-30 13:06:10 +02:00
committed by Jakub Czapiga
parent dc15867e3b
commit fc2f304f06
4 changed files with 7 additions and 7 deletions

View File

@ -157,7 +157,7 @@ struct bdb_general_definitions {
* number = (block_size - sizeof(bdb_general_definitions))/
* sizeof(child_device_config);
*/
struct common_child_dev_config devices[0];
struct common_child_dev_config devices[];
} __attribute__ ((packed));
struct bdb_driver_features {