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 627910 - Warnings emitted when -Wcast-qual used
Warnings emitted when -Wcast-qual used
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal minor
: 0.10.31
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-08-25 05:38 UTC by Jeffrey S. Smith
Modified: 2010-09-01 23:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Clean up warnings emitted when -Wcast-qual used (5.17 KB, patch)
2010-08-25 05:38 UTC, Jeffrey S. Smith
committed Details | Review

Description Jeffrey S. Smith 2010-08-25 05:38:22 UTC
Created attachment 168705 [details] [review]
Clean up warnings emitted when -Wcast-qual used

When another project includes certain gstreamer headers and is using the
-Wcast-qual compiler flag, several warnings show up.  Most are easy to correct.
The only questionable fix is with gst_byte_writer_set_pos, where there is a small
change to the API, to what it probably should have been in the first place, i.e. the first parameter should not have been const in the case of a 'setter' function.
Comment 1 Tim-Philipp Müller 2010-09-01 23:10:49 UTC
Committed with miniscule changes, thanks for the patch!

commit 4375e998eed1571638e66a9eaff2110c2306a2b9
Author: Jeffrey S. Smith <whydoubt@yahoo.com>
Date:   Thu Sep 2 00:01:25 2010 +0100

    Fix casts in a bunch of inline functions to maintain correct const-ness
    
    Make code including GStreamer headers compile with -Wcast-qual by
    maintaining const-ness when casting. Also fix function signature of
    gst_byte_writer_set_pos(): the byte writer should not be marked as
    const.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=627910