提交 fb9da19e 编写于 作者: R Roman Bogorodskiy

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.
上级 06313277
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册