mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
conf: explicitly initialize 'cpumask' variable
Build with clang fails with:
CC conf/libvirt_conf_la-domain_conf.lo
conf/domain_conf.c:13377:9: error: variable 'cpumask' is used
uninitialized whenever 'if' condition is true
[-Werror,-Wsometimes-uninitialized]
if (!(tmp = virXMLPropString(node, "cpuset"))) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
and many other similar errors regarding the 'cpuset' variable.
Fix by explicitly initializing it with NULL.
This commit is contained in:
@@ -13342,7 +13342,7 @@ virDomainIOThreadPinDefParseXML(xmlNodePtr node,
|
||||
{
|
||||
int ret = -1;
|
||||
virDomainIOThreadIDDefPtr iothrid;
|
||||
virBitmapPtr cpumask;
|
||||
virBitmapPtr cpumask = NULL;
|
||||
xmlNodePtr oldnode = ctxt->node;
|
||||
unsigned int iothreadid;
|
||||
char *tmp = NULL;
|
||||
|
||||
Reference in New Issue
Block a user