]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: avoid compiler warning
authorEric Blake <eblake@redhat.com>
Mon, 2 May 2011 23:35:18 +0000 (17:35 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 2 May 2011 23:35:18 +0000 (17:35 -0600)
../../tests/xmconfigtest.c: In function 'testCompareParseXML':
../../tests/xmconfigtest.c:49:19: error: 'conn' may be used uninitialized in this function [-Wuninitialized]

* tests/xmconfigtest.c (testCompareParseXML): Initialize variable.

tests/xmconfigtest.c

index 02a8900cc7eb365c977c152a9124cd6d5ba85c56..6022621a1fa09b882feedb6a42a1edc7ebc8d24a 100644 (file)
@@ -46,7 +46,7 @@ testCompareParseXML(const char *xmcfg, const char *xml, int xendConfigVersion)
     char *gotxmcfgData = NULL;
     virConfPtr conf = NULL;
     int ret = -1;
-    virConnectPtr conn;
+    virConnectPtr conn = NULL;
     int wrote = 4096;
     struct _xenUnifiedPrivate priv;
     virDomainDefPtr def = NULL;