GNOME Bugzilla – Bug 646691
Fails to build with -Werror
Last modified: 2011-04-04 11:13:31 UTC
Created attachment 185094 [details] [review] Initialize matched to FALSE to stop -Wall breaking the build (and potentially avoid a hard-to-track bug) Compiling on Ubuntu Natty with jhbuild (which seems to set -Wall), empathy fails to build: cc1: warnings being treated as errors empathy-tls-verifier.c: In function ‘perform_verification_cb’: empathy-tls-verifier.c:316:6: error: ‘matched’ may be used uninitialized in this function empathy-tls-verifier.c:261:12: note: ‘matched’ was declared here make[3]: *** [empathy-tls-verifier.lo] Error 1 make[3]: Leaving directory `/home/danilo/gnome/code/empathy/libempathy' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/danilo/gnome/code/empathy/libempathy' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/danilo/gnome/code/empathy' make: *** [all] Error 2 matched is being set in a conditional loop that might never be entered. Setting matched to FALSE in the declaration works for me. $ gcc --version gcc (Ubuntu/Linaro 4.5.2-7ubuntu1) 4.5.2 Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Of course, it is -Werror that is breaking the compilation :)
Review of attachment 185094 [details] [review]: Nice catch, thanks. I'll ask for a hard code freeze to merge this.
Approved; merged to master (was already fixed in 2.34). This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.