diff options
author | Elyes Haouas <ehaouas@noos.fr> | 2023-07-28 06:04:46 +0200 |
---|---|---|
committer | Elyes Haouas <ehaouas@noos.fr> | 2023-07-30 09:58:12 +0000 |
commit | 19b534d5fd0595393a6e88d8c7a0eee8b17feda1 (patch) | |
tree | e1b0a8dbc01a4e326e48895b84d93f699026b389 /src | |
parent | 22bb3f0f3ec7dbb77eeb054fca39855bccfd516f (diff) |
include/imd_private.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: I53ffa4b35d35d4f8b0170377041b258d4bd2eeeb
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76777
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/include/imd_private.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/imd_private.h b/src/include/imd_private.h index 7b9a2778ab..3ff6a518aa 100644 --- a/src/include/imd_private.h +++ b/src/include/imd_private.h @@ -28,7 +28,7 @@ struct imd_root { uint32_t entry_align; /* Used for fixing the size of an imd. Relative to the root. */ int32_t max_offset; - struct imd_entry entries[0]; + struct imd_entry entries[]; } __packed; #define IMD_ROOT_PTR_MAGIC 0xc0389481 |