summaryrefslogtreecommitdiffstats
path: root/misc-utils
diff options
context:
space:
mode:
authorSami Kerola2019-04-27 10:54:05 +0200
committerSami Kerola2019-05-01 20:37:54 +0200
commite87263aa13d7e0b2a267fd7aa305c038063c3c0c (patch)
treed2094796c22fa52037517f02f5344791314952ff /misc-utils
parentbuild-sys: release++ (v2.34-rc1) (diff)
downloadkernel-qcow2-util-linux-e87263aa13d7e0b2a267fd7aa305c038063c3c0c.tar.gz
kernel-qcow2-util-linux-e87263aa13d7e0b2a267fd7aa305c038063c3c0c.tar.xz
kernel-qcow2-util-linux-e87263aa13d7e0b2a267fd7aa305c038063c3c0c.zip
hardlink: use flexible array member rather than zero-size array
This fixes two standards compliancy warnings. hardlink.c:65:7: warning: ISO C forbids zero-size array ‘name’ [-Wpedantic] Reference: https://en.wikipedia.org/wiki/Flexible_array_member Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'misc-utils')
-rw-r--r--misc-utils/hardlink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/misc-utils/hardlink.c b/misc-utils/hardlink.c
index 953b3b7f9..d64472e3f 100644
--- a/misc-utils/hardlink.c
+++ b/misc-utils/hardlink.c
@@ -62,7 +62,7 @@ struct hardlink_hash {
struct hardlink_dir {
struct hardlink_dir *next;
- char name[0];
+ char name[];
};
struct hardlink_file {
@@ -70,7 +70,7 @@ struct hardlink_file {
ino_t ino;
dev_t dev;
unsigned int cksum;
- char name[0];
+ char name[];
};
struct hardlink_dynstr {