[PATCH] Avoid "may be used uninitialized" warning.

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

 



I've been seeing this on rawhide for a few days:

xmconfigtest.c:115: warning: 'old_priv' may be used uninitialized in this function

Here's a fix:

	Avoid "may be used uninitialized" warning.
	* tests/xmconfigtest.c (testCompareParseXML): Initialize "old_priv".

Signed-off-by: Jim Meyering <meyering@xxxxxxxxxx>
---
 tests/xmconfigtest.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tests/xmconfigtest.c b/tests/xmconfigtest.c
index d66b660..f49ca6c 100644
--- a/tests/xmconfigtest.c
+++ b/tests/xmconfigtest.c
@@ -51,7 +51,7 @@ static int testCompareParseXML(const char *xmcfg_rel, const char *xml_rel,
     int ret = -1;
     virConnectPtr conn;
     int wrote = MAX_FILE;
-    void *old_priv;
+    void *old_priv = NULL;
     struct _xenUnifiedPrivate priv;
     char xmcfg[PATH_MAX];
     char xml[PATH_MAX];
--
1.5.4.rc4.1.g1895

--
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]