[libvirt] [PATCH] conf: explicitly initialize 'cpumask' variable
Roman Bogorodskiy
bogorodskiy at gmail.com
Tue Apr 28 06:36:47 UTC 2015
Peter Krempa wrote:
> On Tue, Apr 28, 2015 at 08:30:30 +0400, Roman Bogorodskiy wrote:
> > 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.
> > ---
>
> ACK, qualifies for both build-breaker and trivial rule.
Pushed, thanks!
Roman Bogorodskiy
More information about the libvir-list
mailing list