[PATCH] tests: avoid compiler warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



../../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.
---

Pushing under the build-breaker rule.

 tests/xmconfigtest.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tests/xmconfigtest.c b/tests/xmconfigtest.c
index 02a8900..6022621 100644
--- a/tests/xmconfigtest.c
+++ b/tests/xmconfigtest.c
@@ -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;
-- 
1.7.4.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]