[libvirt] [PATCH] virDomainFormatSchedDef: Initialize @priority

Peter Krempa 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...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160209/0318b1a7/attachment-0001.sig>

More information about the libvir-list mailing list