[libvirt] [PATCH] bridge: Fix uninitialized variable

Laine Stump laine at laine.org
Mon Jan 3 13:11:57 UTC 2011


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"




More information about the libvir-list mailing list