]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: initialize variables in qemuParseCommandLine
authorJán Tomko <jtomko@redhat.com>
Tue, 28 Aug 2018 10:53:25 +0000 (12:53 +0200)
committerJán Tomko <jtomko@redhat.com>
Tue, 28 Aug 2018 10:53:25 +0000 (12:53 +0200)
commitea119118fc9e477aaafa1968449c0ffd22d7d84c
tree34f281a1ad633aca1a55355d9de79f2ba9c7edce
parent6700062fb00031c2c4fb8a561653a1a58246ba4b
qemu: initialize variables in qemuParseCommandLine

Commit 6700062 introduced a jump to error which skipped the
initialization of def:

qemu/qemu_parse_command.c:1870:9: error: variable 'def' is
used uninitialized whenever 'if' condition is true
      [-Werror,-Wsometimes-uninitialized]
    if (!(qemuCaps = virQEMUCapsCacheLookup(capsCache, progargv[0])))

Initialize def to fix this warning and qemuCaps, to prevent
a future error like this.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_parse_command.c