Bug 29502 - FTBFS with gcc-4.5
Summary: FTBFS with gcc-4.5
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: gabble (show other bugs)
Version: 0.9
Hardware: Other All
: medium normal
Assignee: Simon McVittie
QA Contact: Telepathy bugs list
URL: http://http://git.collabora.co.uk/?p=...
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2010-08-11 03:46 UTC by Simon McVittie
Modified: 2010-08-11 05:42 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Simon McVittie 2010-08-11 03:46:02 UTC
Gabble gets various compiler warnings with gcc-4.5. Cosimo has a branch with various changes, about which I said:

> > -  g_assert ((priv->state == JS_STATE_PENDING_CREATED) ||
> > -      (priv->state == JS_STATE_ENDED));
> > +  g_assert ((priv->state == (JingleState) JS_STATE_PENDING_CREATED) ||
> > +      (priv->state == (JingleState) JS_STATE_ENDED));
> 
> [...] I don't like scattering casts through our code if we don't
> have to; they clutter the code (hurting clarity), and can mask genuine bugs
> that the compiler would have warned us about.
Comment 1 Simon McVittie 2010-08-11 04:55:39 UTC
Here are (IMO) some better fixes for gcc 4.5 compilation:

* the muc-channel patch in the previous branch was hiding a genuine bug, which gcc spotted for us :-)

* the tube and Jingle things were some minor abuse of numerically-equal enums - harmless, but confusing - which I've tidied up

* in gabble_media_factory_get_contact_caps we did in fact know better than the compiler, so I added a cast, together with a comment explaining why we're right
Comment 2 Simon McVittie 2010-08-11 05:42:18 UTC
r+ from Sjoerd for a modified branch, fixed in git for 0.9.16.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.