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 755657 - Fix -Werror build for clang
Fix -Werror build for clang
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other FreeBSD
: Normal normal
: 1.6.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-09-26 10:24 UTC by Ting-Wei Lan
Modified: 2016-01-11 22:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gstutils: Fix build with clang -Werror=cast-align (1.71 KB, patch)
2015-09-26 10:28 UTC, Ting-Wei Lan
committed Details | Review

Description Ting-Wei Lan 2015-09-26 10:24:11 UTC
gnome-shell switched to AX_COMPILER_FLAGS recently, so -Werror is automatically added when building from git repository. The attached patch fixes a warning in a gstreamer header that prevents gnome-shell from building.

/home/lantw44/gnome/devinstall/include/gstreamer-1.0/gst/gstutils.h:119:11: error: cast from 'const guint8 *' (aka 'const unsigned char *') to 'const guint16 *'
      (aka 'const unsigned short *') increases required alignment from 1 to 2 [-Werror,-Wcast-align]
/home/lantw44/gnome/devinstall/include/gstreamer-1.0/gst/gstutils.h:122:11: error: cast from 'const guint8 *' (aka 'const unsigned char *') to 'const guint32 *'
      (aka 'const unsigned int *') increases required alignment from 1 to 4 [-Werror,-Wcast-align]
/home/lantw44/gnome/devinstall/include/gstreamer-1.0/gst/gstutils.h:125:11: error: cast from 'const guint8 *' (aka 'const unsigned char *') to 'const guint64 *'
      (aka 'const unsigned long *') increases required alignment from 1 to 8 [-Werror,-Wcast-align]
/home/lantw44/gnome/devinstall/include/gstreamer-1.0/gst/gstutils.h:128:30: error: cast from 'const guint8 *' (aka 'const unsigned char *') to 'const guint16 *'
      (aka 'const unsigned short *') increases required alignment from 1 to 2 [-Werror,-Wcast-align]
/home/lantw44/gnome/devinstall/include/gstreamer-1.0/gst/gstutils.h:128:30: error: cast from 'const guint8 *' (aka 'const unsigned char *') to 'const guint16 *'
      (aka 'const unsigned short *') increases required alignment from 1 to 2 [-Werror,-Wcast-align]
/home/lantw44/gnome/devinstall/include/gstreamer-1.0/gst/gstutils.h:131:30: error: cast from 'const guint8 *' (aka 'const unsigned char *') to 'const guint32 *'
      (aka 'const unsigned int *') increases required alignment from 1 to 4 [-Werror,-Wcast-align]
/home/lantw44/gnome/devinstall/include/gstreamer-1.0/gst/gstutils.h:134:30: error: cast from 'const guint8 *' (aka 'const unsigned char *') to 'const guint64 *'
      (aka 'const unsigned long *') increases required alignment from 1 to 8 [-Werror,-Wcast-align]
Comment 1 Ting-Wei Lan 2015-09-26 10:28:02 UTC
Created attachment 312184 [details] [review]
gstutils: Fix build with clang -Werror=cast-align
Comment 2 Tim-Philipp Müller 2015-10-19 12:08:21 UTC
Thanks!

commit 55fae236d0a8695f19ba8b82b2dc7325245384d2
Author: Ting-Wei Lan <lantw@src.gnome.org>
Date:   Sat Sep 26 18:16:07 2015 +0800

    gstutils: Fix build with clang -Werror=cast-align
    
    https://bugzilla.gnome.org/show_bug.cgi?id=755657
Comment 3 Ting-Wei Lan 2016-01-11 07:38:06 UTC
Can this patch be added to 1.6 branch?