Re: ARM libvirt compiling error

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

 



On Mon, Jun 03, 2013 at 11:27:41AM +0200, Michele Paolino wrote:
> Hello,
> 
> I'm trying to set up a development environment on an Arndale (ARM Samsung
> Exynos 5250) board to work on sVirt. I'm using Debian 7.0, I've downloaded
> the source code from GIT and than:
>  ./autogen.sh --prefix=$HOME/usr
> make
> 
> but in the middle of make execution, the program fails with this error:
> conf/domain_conf.c: In function 'virDomainHostdevDefParseXML':
> conf/domain_conf.c:3915:36: error: 'next_unit' may be used uninitialized in
> this function [-Werror=uninitialized]
> conf/domain_conf.c:3886:9: note: 'next_unit' was declared here
> conf/domain_conf.c: At top level:
> cc1: error: unrecognized command line option
> "-Wno-unused-command-line-argument" [-Werror]

The problem is that the compiler is not clever enough to realize that
we only use the 'next_unit' variable if found==true, and we will have
initiailized it by then.

> I've solved this problem simply initializing the "next_unit" variable (file
> src/conf/domain_conf.c, line 3886). This is the diff between the original
> file and the modified one:
> 3886c3886
> <     int next_unit;
> ---
> >     int next_unit = -1;

This looks like the best way to make the compiler shut up.

> Maybe it's only a compiler problem, but can anyone confirm this?
> Is it worth to submit a new bug report/patch the source?

We'd accept a patch initializing it as you suggest

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
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]