mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
vbox: fix compilation error
clang complains about possibly uninitialized variable: vbox/vbox_snapshot_conf.c:1355:9: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (!(xPathContext = xmlXPathNewContext(xml))) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ So init 'ret' with NULL.
This commit is contained in:
parent
c85b09cd7a
commit
0568db02a5
@ -1336,7 +1336,7 @@ virVBoxSnapshotConfGetRODisksPathsFromLibvirtXML(const char *filePath,
|
|||||||
{
|
{
|
||||||
int result = -1;
|
int result = -1;
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
char **ret;
|
char **ret = NULL;
|
||||||
xmlDocPtr xml = NULL;
|
xmlDocPtr xml = NULL;
|
||||||
xmlXPathContextPtr xPathContext = NULL;
|
xmlXPathContextPtr xPathContext = NULL;
|
||||||
xmlNodePtr *nodes = NULL;
|
xmlNodePtr *nodes = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user