summaryrefslogtreecommitdiff
path: root/tools/tools.h
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2020-08-28 19:15:01 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2020-09-01 17:57:50 +0200
commitfd96f1014b11d073d775ea4777f3b3ba2eb93520 (patch)
tree264f612690b669290b79d04b8b03819b3fc07d64 /tools/tools.h
parentcc2218b4014015bd2633454e683293851183e08c (diff)
downloadlvm2-fd96f1014b11d073d775ea4777f3b3ba2eb93520.tar.gz
gcc: zero-sized array to fexlible array C99
Switch remaining zero sized struct to flexible arrays to be C99 complient. These simple rules should apply: - The incomplete array type must be the last element within the structure. - There cannot be an array of structures that contain a flexible array member. - Structures that contain a flexible array member cannot be used as a member of another structure. - The structure must contain at least one named member in addition to the flexible array member. Although some of the code pieces should be still improved.
Diffstat (limited to 'tools/tools.h')
-rw-r--r--tools/tools.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/tools.h b/tools/tools.h
index 4b944e2fd..befff5708 100644
--- a/tools/tools.h
+++ b/tools/tools.h
@@ -110,7 +110,7 @@ struct arg_values {
struct arg_value_group_list {
struct dm_list list;
uint32_t prio;
- struct arg_values arg_values[0];
+ struct arg_values arg_values[];
};
#define PERMITTED_READ_ONLY 0x00000002