From: Daniel P. Berrangé Date: Thu, 4 Jul 2019 13:20:35 +0000 (+0100) Subject: test: ensure nerrors variable is initialized X-Git-Tag: v5.6.0-rc1~324 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80b71b2c85ca5501bfd42ca17c51c5cfdb8190fc;p=thirdparty%2Flibvirt.git test: ensure nerrors variable is initialized There is an error path that jumps over the initialization of nerrors, and the jump target reads the variable contents. Signed-off-by: Daniel P. Berrangé --- diff --git a/src/test/test_driver.c b/src/test/test_driver.c index ce4ff1a582..2371581f51 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -3275,7 +3275,7 @@ static int testDomainGetDiskErrors(virDomainPtr dom, virDomainObjPtr vm = NULL; int ret = -1; size_t i; - size_t nerrors; + size_t nerrors = 0; virCheckFlags(0, -1);