mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
qemuDomainGetVcpusFlags: Initialize ncpuinfo
Currently, there's a path to use the ncpuinfo variable uninitialized, which leads to a compiler warning: qemu/qemu_driver.c: In function 'qemuDomainGetVcpusFlags': qemu/qemu_driver.c:4573:9: error: 'ncpuinfo' may be used uninitialized in this function [-Werror=maybe-uninitialized] for (i = 0; i < ncpuinfo; i++) { ^
This commit is contained in:
parent
c12b2be516
commit
cdd823c073
@ -4512,7 +4512,7 @@ qemuDomainGetVcpusFlags(virDomainPtr dom, unsigned int flags)
|
||||
int ret = -1;
|
||||
virCapsPtr caps = NULL;
|
||||
qemuAgentCPUInfoPtr cpuinfo = NULL;
|
||||
int ncpuinfo;
|
||||
int ncpuinfo = -1;
|
||||
int i;
|
||||
|
||||
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
|
||||
|
Loading…
x
Reference in New Issue
Block a user