[pve-devel] [PATCH cluster 3/4] Wpedantic: mark flexible arrays with [] not [0]

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Sep 7 13:50:46 CEST 2018


https://gcc.gnu.org/onlinedocs/gcc-8.2.0/gcc/Zero-Length.html
(same as in GCC 4.7.4 docs)

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 data/src/memdb.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/data/src/memdb.h b/data/src/memdb.h
index 89d8d32..60df035 100644
--- a/data/src/memdb.h
+++ b/data/src/memdb.h
@@ -48,7 +48,7 @@ struct memdb_tree_entry {
 		GHashTable *entries;
 		gpointer value;
 	} data;
-	char name[0];
+	char name[];
 };
 
 typedef struct {
@@ -63,7 +63,7 @@ typedef struct {
 	guint32 mtime;
 	guint32 size;  /* number of entries */
 	guint32 bytes; /* total bytes allocated */
-	memdb_index_extry_t entries[0];
+	memdb_index_extry_t entries[];
 } memdb_index_t;
 
 typedef struct db_backend db_backend_t;
-- 
2.18.0





More information about the pve-devel mailing list