From 80b71b2c85ca5501bfd42ca17c51c5cfdb8190fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Thu, 4 Jul 2019 14:20:35 +0100 Subject: [PATCH] test: ensure nerrors variable is initialized MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é --- src/test/test_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- GitLab