[Skiboot] [PATCH 1/6] libflash: Put variable sized type at end of struct
Joel Stanley
joel at jms.id.au
Tue Jul 21 13:23:10 AEST 2015
This is a fixes the following error when building with clang:
libflash/libffs.c:37:18: error: field 'hdr' with variable sized type
'struct ffs_hdr' not at the end of a struct or class is a GNU extension
[-Werror,-Wgnu-variable-sized-type-not-at-end]
struct ffs_hdr hdr; /* Converted header */
^
Signed-off-by: Joel Stanley <joel at jms.id.au>
---
libflash/libffs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libflash/libffs.c b/libflash/libffs.c
index 0164071..a193357 100644
--- a/libflash/libffs.c
+++ b/libflash/libffs.c
@@ -34,7 +34,6 @@ enum ffs_type {
};
struct ffs_handle {
- struct ffs_hdr hdr; /* Converted header */
enum ffs_type type;
struct flash_chip *chip;
uint32_t toc_offset;
@@ -42,6 +41,7 @@ struct ffs_handle {
void *cache;
uint32_t cached_size;
struct blocklevel_device *bl;
+ struct ffs_hdr hdr; /* Converted header */
};
static uint32_t ffs_checksum(void* data, size_t size)
--
2.1.4
More information about the Skiboot
mailing list