Re: [PATCH] bridge: Fix uninitialized variable

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

 



ä 2011å01æ04æ 17:13, Justin Clift åé:
On 04/01/2011, at 12:11 AM, Laine Stump wrote:
On 01/03/2011 04:19 AM, Jiri Denemark wrote:
@@ -715,7 +715,7 @@ brDelInetAddress(brControl *ctl ATTRIBUTE_UNUSED,
                    virSocketAddr *addr,
                    unsigned int prefix)
   {
-    virCommandPtr cmd;
+    virCommandPtr cmd = NULL;
       char *addrstr;
       int ret = -1;

Wow! How did I miss *that*?!?

Thanks for catching it!

(Beyond that - what options are you using that it didn't build?
I always build with --enable-compile-warnings=error so any compiler warning
results in build failure. No special options beyond that.

Right. I do that too, and never saw an error. Your compiler must be warning on more things than mine. Here's my build commandline (copied from Jim nearly 2 years ago, and pretty much unchanged since):

./autogen.sh --with-qemu-user=qemu --with-qemu-group=qemu --enable-compile-warnings=error --prefix=/usr --libdir=/usr/lib64 --disable-nls CFLAGS="-g -Wformat -Wformat-security -Winit-self -Wall -Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings -Winline -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 -Dlint"

As a general thought, would there be benefit in us updating the libvirt.org "Compiling" page to show useful arguments like these for development?

That will be nice, at least I didn't use these much options when
compiling before,  :-)

Regards
Osier

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