diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2021-09-22 17:05:09 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2021-09-22 17:18:50 +0200 |
commit | 9eafd44734d32207dce7d0b0829e3c94c07d95c9 (patch) | |
tree | f40d8d3b187ea68b5898f87fc04bade87a771d5b /libdm/misc | |
parent | 4515acf73430a8734f477b10ae6e3473d02999ae (diff) | |
download | lvm2-9eafd44734d32207dce7d0b0829e3c94c07d95c9.tar.gz |
gcc: use more zero length arrays
Define last array struct member with zero size.
Diffstat (limited to 'libdm/misc')
-rw-r--r-- | libdm/misc/dm-ioctl.h | 8 | ||||
-rw-r--r-- | libdm/misc/dm-log-userspace.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/libdm/misc/dm-ioctl.h b/libdm/misc/dm-ioctl.h index 55dee2148..52a7a93d1 100644 --- a/libdm/misc/dm-ioctl.h +++ b/libdm/misc/dm-ioctl.h @@ -183,7 +183,7 @@ struct dm_target_spec { struct dm_target_deps { uint32_t count; /* Array size */ uint32_t padding; /* unused */ - uint64_t dev[]; /* out */ + uint64_t dev[0]; /* out */ }; /* @@ -193,7 +193,7 @@ struct dm_name_list { uint64_t dev; uint32_t next; /* offset to the next record from the _start_ of this */ - char name[]; + char name[0]; }; /* @@ -203,7 +203,7 @@ struct dm_target_versions { uint32_t next; uint32_t version[3]; - char name[]; + char name[0]; }; /* @@ -212,7 +212,7 @@ struct dm_target_versions { struct dm_target_msg { uint64_t sector; /* Device sector */ - char message[]; + char message[0]; }; /* diff --git a/libdm/misc/dm-log-userspace.h b/libdm/misc/dm-log-userspace.h index b243194d9..f28fa585e 100644 --- a/libdm/misc/dm-log-userspace.h +++ b/libdm/misc/dm-log-userspace.h @@ -412,7 +412,7 @@ struct dm_ulog_request { uint32_t request_type; /* DM_ULOG_* defined above */ uint32_t data_size; /* How much data (not including this struct) */ - char data[]; + char data[0]; }; #endif /* __DM_LOG_USERSPACE_H__ */ |