提交 1055852a 编写于 作者: J Ján Tomko

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.
上级 5c05e2b1
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册