Re: [libvirt] [PATCH] build: detect potentential uninitialized variables

2011-04-04 Thread Eric Blake
On 04/02/2011 12:15 AM, Matthias Bolte wrote: which prints 0 (if the stack was previously wiped) if cond was true. Clang will catch it, but we dont' use clang as often. Using gcc -Wjump-misses-init gives false positives: ACK. Thanks; pushed. -- Eric Blake ebl...@redhat.com

Re: [libvirt] [PATCH] build: detect potentential uninitialized variables

2011-04-02 Thread Matthias Bolte
2011/4/1 Eric Blake ebl...@redhat.com: Even with -Wuninitialized (which is part of autobuild.sh --enable-compile-warnings=error), gcc does NOT catch this use of an uninitialized variable: {  if (cond)    goto error;  int a = 1; error:  printf(%d, a); } which prints 0 (if the stack was

[libvirt] [PATCH] build: detect potentential uninitialized variables

2011-04-01 Thread Eric Blake
Even with -Wuninitialized (which is part of autobuild.sh --enable-compile-warnings=error), gcc does NOT catch this use of an uninitialized variable: { if (cond) goto error; int a = 1; error: printf(%d, a); } which prints 0 (if the stack was previously wiped) if cond was true. Clang