Skip to contentSkip to conversation

master - cleanup: make gcc happier with initializers

PATCH Zdenek Kabelac 1 participant 1 message Nov 22, 2013

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=62db5c1e48467ef846432652dd1058eb85c0bcbd
Commit:        62db5c1e48467ef846432652dd1058eb85c0bcbd
Parent:        6ebbf1982892a819dc14045a8dca0ad512cebdf8
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Fri Nov 22 20:42:03 2013 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Fri Nov 22 21:00:56 2013 +0100

cleanup: make gcc happier with initializers

Whole struct will be set to 0, just
if the first member is array, gcc gives warning we should initialized this element as array, so pick any later simple type.

---
 tools/reporter.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
tools/reporter.c +2 -2
index dccd785..bf181e7 100644
@@ -141,8 +141,8 @@ static int _pvs_single(struct cmd_context *cmd, struct volume_group *vg,
 	struct volume_group *old_vg = vg;
 	char uuid[64] __attribute__((aligned(8)));
 	struct label *label;
-	struct label _dummy_label = { 0 };
-	struct device _dummy_device = { 0 };
+	struct label _dummy_label = { .dev = 0 };
+	struct device _dummy_device = { .dev = 0 };
 
 	if (is_pv(pv) && !is_orphan(pv) && !vg) {
 		vg_name = pv_vg_name(pv);