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 750725 - cogl fail to compile with clang because of -Werror=cast-align
cogl fail to compile with clang because of -Werror=cast-align
Status: RESOLVED FIXED
Product: cogl
Classification: Platform
Component: general
1.20.x
Other FreeBSD
: Normal normal
: ---
Assigned To: Cogl maintainer(s)
Cogl maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-06-10 16:47 UTC by Ting-Wei Lan
Modified: 2015-06-10 16:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build: Drop -Werror for cast-align warnings (986 bytes, patch)
2015-06-10 16:53 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review

Description Ting-Wei Lan 2015-06-10 16:47:24 UTC
Error messages found when running 'gmake -k':

test-utils.c:235:53: error: cast from 'const uint8_t *' (aka 'const unsigned char *') to 'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4
test-utils.c:256:53: error: cast from 'const uint8_t *' (aka 'const unsigned char *') to 'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4
./driver/gl/cogl-framebuffer-gl.c:1068:13: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'int *' increases required alignment from 1 to 4
./driver/gl/cogl-pipeline-fragend-glsl.c:918:9: error: cast from 'char *' to 'LayerData *' (aka 'struct _LayerData *') increases required alignment from 1 to 8
./driver/gl/cogl-pipeline-fragend-glsl.c:1026:24: error: cast from 'char *' to 'LayerData *' (aka 'struct _LayerData *') increases required alignment from 1 to 8
./cogl-bitmap-packing.h:207:21: error: cast from 'const uint8_t *' (aka 'const unsigned char *') to 'const uint16_t *' (aka 'const unsigned short *') increases
./cogl-bitmap-packing.h:225:21: error: cast from 'const uint8_t *' (aka 'const unsigned char *') to 'const uint16_t *' (aka 'const unsigned short *') increases
./cogl-bitmap-packing.h:243:21: error: cast from 'const uint8_t *' (aka 'const unsigned char *') to 'const uint16_t *' (aka 'const unsigned short *') increases
./cogl-bitmap-packing.h:261:21: error: cast from 'const uint8_t *' (aka 'const unsigned char *') to 'const uint32_t *' (aka 'const unsigned int *') increases required
./cogl-bitmap-packing.h:279:21: error: cast from 'const uint8_t *' (aka 'const unsigned char *') to 'const uint32_t *' (aka 'const unsigned int *') increases required
./cogl-bitmap-packing.h:297:21: error: cast from 'const uint8_t *' (aka 'const unsigned char *') to 'const uint32_t *' (aka 'const unsigned int *') increases required
./cogl-bitmap-packing.h:315:21: error: cast from 'const uint8_t *' (aka 'const unsigned char *') to 'const uint32_t *' (aka 'const unsigned int *') increases required
./cogl-bitmap-packing.h:568:21: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'uint16_t *' (aka 'unsigned short *') increases required alignment from 1 to 2
./cogl-bitmap-packing.h:585:21: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'uint16_t *' (aka 'unsigned short *') increases required alignment from 1 to 2
./cogl-bitmap-packing.h:603:21: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'uint16_t *' (aka 'unsigned short *') increases required alignment from 1 to 2
./cogl-bitmap-packing.h:621:21: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4
./cogl-bitmap-packing.h:639:21: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4
./cogl-bitmap-packing.h:657:21: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4
./cogl-bitmap-packing.h:675:21: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4
./cogl-bitmap-packing.h:207:21: error: cast from 'const uint8_t *' (aka 'const unsigned char *') to 'const uint16_t *' (aka 'const unsigned short *') increases
./cogl-bitmap-packing.h:225:21: error: cast from 'const uint8_t *' (aka 'const unsigned char *') to 'const uint16_t *' (aka 'const unsigned short *') increases
./cogl-bitmap-packing.h:243:21: error: cast from 'const uint8_t *' (aka 'const unsigned char *') to 'const uint16_t *' (aka 'const unsigned short *') increases
./cogl-bitmap-packing.h:261:21: error: cast from 'const uint8_t *' (aka 'const unsigned char *') to 'const uint32_t *' (aka 'const unsigned int *') increases required
./cogl-bitmap-packing.h:279:21: error: cast from 'const uint8_t *' (aka 'const unsigned char *') to 'const uint32_t *' (aka 'const unsigned int *') increases required
./cogl-primitives.c:1085:7: error: cast from 'gchar *' (aka 'char *') to 'float *' increases required alignment from 1 to 4 [-Werror,-Wcast-align]
./cogl-primitives.c:1117:7: error: cast from 'gchar *' (aka 'char *') to 'float *' increases required alignment from 1 to 4 [-Werror,-Wcast-align]
./cogl-feature-private.c:169:8: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'void **' increases required alignment from 1 to 8 [-Werror,-Wcast-align]
./cogl-feature-private.c:180:6: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'void **' increases required alignment from 1 to 8 [-Werror,-Wcast-align]
./cogl-matrix.c:2055:20: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'Point2f *' (aka 'struct _Point2f *') increases required alignment from 1 to 4
./cogl-matrix.c:2056:20: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'Point3f *' (aka 'struct _Point3f *') increases required alignment from 1 to 4
./cogl-matrix.c:2076:20: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'Point2f *' (aka 'struct _Point2f *') increases required alignment from 1 to 4
./cogl-matrix.c:2077:20: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'Point4f *' (aka 'struct _Point4f *') increases required alignment from 1 to 4
./cogl-matrix.c:2098:20: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'Point3f *' (aka 'struct _Point3f *') increases required alignment from 1 to 4
./cogl-matrix.c:2099:20: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'Point3f *' (aka 'struct _Point3f *') increases required alignment from 1 to 4
./cogl-matrix.c:2122:20: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'Point3f *' (aka 'struct _Point3f *') increases required alignment from 1 to 4
./cogl-matrix.c:2123:20: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'Point4f *' (aka 'struct _Point4f *') increases required alignment from 1 to 4
./cogl-matrix.c:2148:20: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'Point4f *' (aka 'struct _Point4f *') increases required alignment from 1 to 4
./cogl-matrix.c:2149:20: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'Point4f *' (aka 'struct _Point4f *') increases required alignment from 1 to 4
./cogl-texture-2d-sliced.c:114:23: error: cast from 'gchar *' (aka 'char *') to 'CoglSpan *' (aka 'struct _CoglSpan *') increases required alignment from 1 to 4
./cogl-texture-2d-sliced.c:115:23: error: cast from 'gchar *' (aka 'char *') to 'CoglSpan *' (aka 'struct _CoglSpan *') increases required alignment from 1 to 4
./cogl-texture-2d-sliced.c:116:28: error: cast from 'gchar *' (aka 'char *') to 'CoglTexture **' (aka 'struct _CoglTexture **') increases required alignment from 1 to
./cogl-texture-2d-sliced.c:465:31: error: cast from 'gchar *' (aka 'char *') to 'CoglSpan *' (aka 'struct _CoglSpan *') increases required alignment from 1 to 4
./cogl-texture-2d-sliced.c:483:35: error: cast from 'gchar *' (aka 'char *') to 'CoglSpan *' (aka 'struct _CoglSpan *') increases required alignment from 1 to 4
./cogl-journal.c:182:18: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'float *' increases required alignment from 1 to 4 [-Werror,-Wcast-align]
./cogl-journal.c:209:18: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'float *' increases required alignment from 1 to 4 [-Werror,-Wcast-align]
./cogl-journal.c:305:16: error: cast from 'gchar *' (aka 'char *') to 'CoglAttribute **' (aka 'struct _CoglAttribute **') increases required alignment from 1 to 8
./cogl-journal.c:1220:29: error: cast from 'gchar *' (aka 'char *') to 'CoglJournalEntry *' (aka 'struct _CoglJournalEntry *') increases required alignment from 1 to 8
./cogl-journal.c:1359:23: error: cast from 'gchar *' (aka 'char *') to 'CoglJournalEntry *' (aka 'struct _CoglJournalEntry *') increases required alignment from 1 to 8
./cogl-journal.c:1399:19: error: cast from 'gchar *' (aka 'char *') to 'CoglJournalEntry *' (aka 'struct _CoglJournalEntry *') increases required alignment from 1 to 8
./cogl-journal.c:1786:25: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'float *' increases required alignment from 1 to 4 [-Werror,-Wcast-align]
./cogl-onscreen.c:217:9: error: cast from 'char *' to 'CoglOnscreenQueuedDirty *' (aka 'struct _CoglOnscreenQueuedDirty *') increases required alignment from 1 to 8
./cogl-point-in-poly.c:81:24: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'float *' increases required alignment from 1 to 4 [-Werror,-Wcast-align]
./cogl-point-in-poly.c:82:24: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'float *' increases required alignment from 1 to 4 [-Werror,-Wcast-align]
./cogl-point-in-poly.c:83:24: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'float *' increases required alignment from 1 to 4 [-Werror,-Wcast-align]
./cogl-point-in-poly.c:85:24: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'float *' increases required alignment from 1 to 4 [-Werror,-Wcast-align]
./cogl-memory-stack.c:152:15: error: cast from 'char *' to 'CoglMemorySubStack *' (aka 'struct _CoglMemorySubStack *') increases required alignment from 1 to 8
./cogl-memory-stack.c:158:15: error: cast from 'char *' to 'CoglMemorySubStack *' (aka 'struct _CoglMemorySubStack *') increases required alignment from 1 to 8
./cogl-memory-stack.c:170:22: error: cast from 'char *' to 'CoglMemorySubStack *' (aka 'struct _CoglMemorySubStack *') increases required alignment from 1 to 8
./cogl-memory-stack.c:190:9: error: cast from 'char *' to 'CoglMemorySubStack *' (aka 'struct _CoglMemorySubStack *') increases required alignment from 1 to 8
./cogl-gles2-context.c:1530:9: error: cast from 'char *' to 'CoglGLES2Offscreen *' (aka 'struct _CoglGLES2Offscreen *') increases required alignment from 1 to 8
./cogl-fence.c:225:15: error: cast from 'char *' to 'CoglFenceClosure *' (aka 'struct _CoglFenceClosure *') increases required alignment from 1 to 8
cogl-pango-display-list.c:250:29: error: cast from 'gchar *' (aka 'char *') to 'const float *' increases required alignment from 1 to 4 [-Werror,-Wcast-align]
/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 *'
/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 *'
/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 *'
/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 *'
/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 *'
/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 *'
/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 *'
/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 *'
/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 *'
/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 *'
/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 *'
/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 *'
test-sub-texture.c:252:45: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4
/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 *'
/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 *'
/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 *'
/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 *'
/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 *'
/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 *'
Comment 1 Emmanuele Bassi (:ebassi) 2015-06-10 16:53:47 UTC
Created attachment 304999 [details] [review]
build: Drop -Werror for cast-align warnings

It seems we really suck at that, or clang is really strict.
Comment 2 Emmanuele Bassi (:ebassi) 2015-06-10 16:54:13 UTC
Attachment 304999 [details] pushed as eaf816f - build: Drop -Werror for cast-align warnings