GNOME Bugzilla – Bug 755657
Fix -Werror build for clang
Last modified: 2016-01-11 22:04:07 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]
Created attachment 312184 [details] [review] gstutils: Fix build with clang -Werror=cast-align
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
Can this patch be added to 1.6 branch?