From: Chen Hanxiao Date: Tue, 29 Jul 2014 02:05:08 +0000 (+0800) Subject: nodedev: fix a uninitialized variable build failure X-Git-Tag: v1.2.7-rc2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71ee25f562595db8e474751e792effd2d961da1b;p=thirdparty%2Flibvirt.git nodedev: fix a uninitialized variable build failure Fix a -Werror=maybe-uninitialized warning Signed-off-by: Chen Hanxiao Signed-off-by: Eric Blake --- diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index 78bc63f13d..96524a6278 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -1349,7 +1349,7 @@ virNodeDevCapsDefParseXML(xmlXPathContextPtr ctxt, { virNodeDevCapsDefPtr caps; char *tmp; - int val, ret; + int val, ret = -1; if (VIR_ALLOC(caps) < 0) return NULL;