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>
This commit is contained in:
parent
4267f2bcea
commit
e87263aa13
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue