summaryrefslogtreecommitdiff
path: root/payloads/libpayload/drivers
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2023-07-30 17:30:11 +0200
committerJakub Czapiga <jacz@semihalf.com>2023-08-01 12:40:07 +0000
commit3bb076e5218e437af3e71dd50c85e01963594fe4 (patch)
tree02dc4bf5200fe202d174effdd11d07ab7385e399 /payloads/libpayload/drivers
parentae51ee8c950116f43a8213bb8d611ddfff3f4883 (diff)
libpayload/drivers/cbmem_console: 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: I3fd3f068ff731e1d9fed7c38ba6815e1eed86450 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76849 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Diffstat (limited to 'payloads/libpayload/drivers')
-rw-r--r--payloads/libpayload/drivers/cbmem_console.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/payloads/libpayload/drivers/cbmem_console.c b/payloads/libpayload/drivers/cbmem_console.c
index df40ad01be..c243d5e88d 100644
--- a/payloads/libpayload/drivers/cbmem_console.c
+++ b/payloads/libpayload/drivers/cbmem_console.c
@@ -32,7 +32,7 @@
struct cbmem_console {
uint32_t size;
uint32_t cursor;
- uint8_t body[0];
+ uint8_t body[];
} __packed;
#define CURSOR_MASK ((1 << 28) - 1)