Message ID | 1437448995-7936-2-git-send-email-joel@jms.id.au |
---|---|
State | Rejected |
Headers | show |
Joel Stanley <joel@jms.id.au> writes: > 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 */ Merging the go-to-gnu11 as std instead.
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)
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@jms.id.au> --- libflash/libffs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)