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 769167 - ahc: fix strict aliasing warnings
ahc: fix strict aliasing warnings
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal minor
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-07-25 21:08 UTC by Martin Kelly
Modified: 2018-11-03 13:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-ahc-fix-strict-aliasing-warnings.patch (5.81 KB, patch)
2016-07-25 21:08 UTC, Martin Kelly
none Details | Review

Description Martin Kelly 2016-07-25 21:08:17 UTC
Created attachment 332119 [details] [review]
0001-ahc-fix-strict-aliasing-warnings.patch

gcc strict aliasing can break code that performs type-punning, unless
said type punning uses unions. See:

http://www.cocoawithlove.com/2008/04/using-pointers-to-recast-in-c-is-bad.html

for more details about the UNION_CAST macro that I used.
Comment 1 Sebastian Dröge (slomo) 2016-07-26 10:51:41 UTC
Is it really needed in this specific case? It doesn't seem necessary as none of the two pointers is ever going to be dereferenced in this scope? Does it create a compiler warning?
Comment 2 Martin Kelly 2016-07-26 15:51:03 UTC
In this case, I'm not seeing any bugs resulting from it, as I don't think gcc has much opportunity to optimize. However, it seems like that could change in future version of gcc :). Yes, it is generating a warning. I think we should either fix it or turn off strict aliasing; either way is fine with me.
Comment 3 GStreamer system administrator 2018-11-03 13:53:49 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/412.