On 06/27/2011 09:32 AM, Laine Stump wrote:
On 06/27/2011 10:16 AM, Eric Blake wrote:
CC dutil_linux.lo dutil_linux.c: In function ‘run_program’: dutil_linux.c:201:11: warning: ‘childpid’ may be used uninitialized in this function
ACK and pushed.
I'm wondering why I don't see this warning though. Here's the commandline (buried down in a script I never look at) I use to build netcf:
./autogen.sh --enable-compile-warnings=error --prefix=/usr --libdir=/usr/lib64 --disable-nls CFLAGS="-g -Wformat -Wformat-security
-g without -O is the culprit. Gcc doesn't warn about uninitialized variables except at -O2. You have to get smarter tools (like clang or coverity) to get those warnings at all compilation levels. :(
I really wish gcc would improve in this regards, but it has been a known open feature request for several years.