From: Ján Tomko Date: Fri, 2 May 2014 07:37:34 +0000 (+0200) Subject: fix build with older gcc X-Git-Tag: v1.2.4~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1055852aef8c22fe1d1549d7d3739dc8a1c3f02b;p=thirdparty%2Flibvirt.git fix build with older gcc Older gcc (4.1.2-55.el5, 4.2.1 on FreeBSD) reports bogus warnings: ../../src/conf/nwfilter_conf.c:2111: warning: 'protocol' may be used uninitialized in this function ../../src/conf/nwfilter_conf.c:2110: warning: 'dataProtocolID' may be used uninitialized in this function Initialize them to NULL to make the compiler happy. --- diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c index 67b5482a1d..b9f6d5115f 100644 --- a/src/conf/nwfilter_conf.c +++ b/src/conf/nwfilter_conf.c @@ -2107,8 +2107,8 @@ virNWFilterRuleValidate(virNWFilterRuleDefPtr rule) { int ret = 0; portDataDefPtr portData = NULL; - nwItemDescPtr dataProtocolID; - const char *protocol; + nwItemDescPtr dataProtocolID = NULL; + const char *protocol = NULL; switch (rule->prtclType) { case VIR_NWFILTER_RULE_PROTOCOL_IP: