[PATCH] qemu: Silent bogus warning about unitialized variable

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

 



GCC complaints about uninitialized use of len, which however is only
used when errors != NULL and in that case len is always initialized.
It's trivial to silence this by always initializing len.
---
Pushed as both trivial and build-breaking.

 daemon/remote.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/daemon/remote.c b/daemon/remote.c
index 8fbcf43..26ac4a6 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -3608,7 +3608,7 @@ static int remoteDispatchDomainGetDiskErrors(
     int rv = -1;
     virDomainPtr dom = NULL;
     virDomainDiskErrorPtr errors = NULL;
-    int len;
+    int len = 0;
     struct daemonClientPrivate *priv =
         virNetServerClientGetPrivateData(client);
 
-- 
1.7.8.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]