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é <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2019-07-04 14:20:35 +01:00
parent 613c8eeaa2
commit 80b71b2c85

View File

@ -3275,7 +3275,7 @@ static int testDomainGetDiskErrors(virDomainPtr dom,
virDomainObjPtr vm = NULL; virDomainObjPtr vm = NULL;
int ret = -1; int ret = -1;
size_t i; size_t i;
size_t nerrors; size_t nerrors = 0;
virCheckFlags(0, -1); virCheckFlags(0, -1);