[libvirt] [PATCH] qemu: Silent bogus warning about unitialized variable

1 Feb
2012
1 Feb
'12
3:20 p.m.
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
4961
Age (days ago)
4961
Last active (days ago)
0 comments
1 participants
participants (1)
-
Jiri Denemark