diff options
author | Elyes Haouas <ehaouas@noos.fr> | 2023-07-30 17:28:49 +0200 |
---|---|---|
committer | Jakub Czapiga <jacz@semihalf.com> | 2023-08-01 12:37:07 +0000 |
commit | ae51ee8c950116f43a8213bb8d611ddfff3f4883 (patch) | |
tree | e4a7ebaeeda586556e2c1818a820938d7a7b97b1 | |
parent | a434f48bbed4eee773fa3315cac6796859805e45 (diff) |
commonlib/timestamp_serialized.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: Ibd1e4bc96a2f5eea746328a09d123629c20b272c
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76847
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
-rw-r--r-- | src/commonlib/include/commonlib/timestamp_serialized.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/commonlib/include/commonlib/timestamp_serialized.h b/src/commonlib/include/commonlib/timestamp_serialized.h index d7575e78d9..61e1565d64 100644 --- a/src/commonlib/include/commonlib/timestamp_serialized.h +++ b/src/commonlib/include/commonlib/timestamp_serialized.h @@ -16,7 +16,7 @@ struct timestamp_table { uint16_t max_entries; uint16_t tick_freq_mhz; uint32_t num_entries; - struct timestamp_entry entries[0]; /* Variable number of entries */ + struct timestamp_entry entries[]; /* Variable number of entries */ } __packed; enum timestamp_id { |