After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 646691 - Fails to build with -Werror
Fails to build with -Werror
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: General
2.91.x
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
empathy-maint
Depends on:
Blocks:
 
 
Reported: 2011-04-04 09:27 UTC by Danilo Segan
Modified: 2011-04-04 11:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Initialize matched to FALSE to stop -Wall breaking the build (and potentially avoid a hard-to-track bug) (450 bytes, patch)
2011-04-04 09:27 UTC, Danilo Segan
accepted-commit_after_freeze Details | Review

Description Danilo Segan 2011-04-04 09:27:38 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.
Comment 1 Danilo Segan 2011-04-04 09:59:53 UTC
Of course, it is -Werror that is breaking the compilation :)
Comment 2 Guillaume Desmottes 2011-04-04 10:17:02 UTC
Review of attachment 185094 [details] [review]:

Nice catch, thanks. I'll ask for a hard code freeze to merge this.
Comment 3 Guillaume Desmottes 2011-04-04 11:13:31 UTC
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.