Re: [PATCH] vbox: fix compilation error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  Michal Privoznik wrote:

> On 10.06.2014 19:10, Roman Bogorodskiy wrote:
> > clang complains about possibly uninitialized variable:
> >
> > vbox/vbox_snapshot_conf.c:1355:9: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
> >      if (!(xPathContext = xmlXPathNewContext(xml))) {
> >          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> > So init 'ret' with NULL.
> 
> Okay, I must admit clang has cool error reporting. But in fact, ret may 
> be used uninitialized way before reaching this line - there are two 
> places before where conditional jump is possible. But I guess compiler 
> is not SA tool anyway, right?

Actually, it reported these cases as well:

https://dpaste.de/oDuE

I just decided to mention the first one as the cause of all the errors
here is the same.

Roman Bogorodskiy

Attachment: pgpgNWJZcnvwX.pgp
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]