[libvirt] [PATCH] virDomainFormatSchedDef: Initialize @priority
pkrempa at redhat.com
Tue Feb 9 08:26:33 UTC 2016
On Tue, Feb 09, 2016 at 09:08:49 +0100, Michal Privoznik wrote:
> Older gcc fails to see that the variable is set iff @hasPriority
> == true in which case the former is set a value. Initialize the
> value while declaring it to make the compiler shut up.
Initializing it may confuse a next reader, since there is no default
value that would make sense at this point.
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> This maybe isn't the best approach, to workaround false
> positives. I'm open to discussion.
I'd suggest using non-broken compilers on non-ancient platforms and
leaving the code be.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 819 bytes
Desc: Digital signature
More information about the libvir-list