[Bug 599546] [0.10/1.0] Faster write macros
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Mon Jun 11 01:07:20 PDT 2012
https://bugzilla.gnome.org/show_bug.cgi?id=599546
GStreamer | gstreamer (core) | git
--- Comment #35 from Sebastian Dröge <slomo at circular-chaos.org> 2012-06-11 08:07:12 UTC ---
Causes compiler warnings in gnonlin with clang 3.1:
CC libgnl_la-gnl.lo
In file included from gnl.c:25:
In file included from ./gnl.h:24:
In file included from
/home/slomo/Projects/gstreamer/head/gstreamer/gst/gst.h:82:
/home/slomo/Projects/gstreamer/head/gstreamer/gst/gstutils.h:120: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]
return *(const guint16*)(v);
^~~~~~~~~~~~~~~~~~~
/home/slomo/Projects/gstreamer/head/gstreamer/gst/gstutils.h:123: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]
return *(const guint32*)(v);
^~~~~~~~~~~~~~~~~~~
/home/slomo/Projects/gstreamer/head/gstreamer/gst/gstutils.h:126: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]
return *(const guint64*)(v);
^~~~~~~~~~~~~~~~~~~
/home/slomo/Projects/gstreamer/head/gstreamer/gst/gstutils.h:129: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]
return GUINT16_SWAP_LE_BE(*(const guint16*)(v));
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gtypes.h:313:67: note: expanded from macro
'GUINT16_SWAP_LE_BE'
# define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_CONSTANT (val))
^
/usr/include/glib-2.0/glib/gtypes.h:154:27: note: expanded from macro
'GUINT16_SWAP_LE_BE_CONSTANT'
(guint16) ((guint16) (val) >> 8) | \
^~~
In file included from gnl.c:25:
In file included from ./gnl.h:24:
In file included from
/home/slomo/Projects/gstreamer/head/gstreamer/gst/gst.h:82:
/home/slomo/Projects/gstreamer/head/gstreamer/gst/gstutils.h:129: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]
return GUINT16_SWAP_LE_BE(*(const guint16*)(v));
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gtypes.h:313:67: note: expanded from macro
'GUINT16_SWAP_LE_BE'
# define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_CONSTANT (val))
^
/usr/include/glib-2.0/glib/gtypes.h:155:27: note: expanded from macro
'GUINT16_SWAP_LE_BE_CONSTANT'
(guint16) ((guint16) (val) << 8)))
^~~
In file included from gnl.c:25:
In file included from ./gnl.h:24:
In file included from
/home/slomo/Projects/gstreamer/head/gstreamer/gst/gst.h:82:
/home/slomo/Projects/gstreamer/head/gstreamer/gst/gstutils.h:132: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]
return GUINT32_SWAP_LE_BE(*(const guint32*)(v));
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gtypes.h:315:67: note: expanded from macro
'GUINT32_SWAP_LE_BE'
# define GUINT32_SWAP_LE_BE(val) (GUINT32_SWAP_LE_BE_X86_64 (val))
^
/usr/include/glib-2.0/glib/gtypes.h:294:46: note: expanded from macro
'GUINT32_SWAP_LE_BE_X86_64'
({ register guint32 __v, __x = ((guint32) (val)); \
^~~
In file included from gnl.c:25:
In file included from ./gnl.h:24:
In file included from
/home/slomo/Projects/gstreamer/head/gstreamer/gst/gst.h:82:
/home/slomo/Projects/gstreamer/head/gstreamer/gst/gstutils.h:135: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]
return GUINT64_SWAP_LE_BE(*(const guint64*)(v));
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gtypes.h:318:67: note: expanded from macro
'GUINT64_SWAP_LE_BE'
# define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_X86_64 (val))
^
/usr/include/glib-2.0/glib/gtypes.h:304:45: note: expanded from macro
'GUINT64_SWAP_LE_BE_X86_64'
({ register guint64 __v, __x = ((guint64) (val)); \
^~~
7 errors generated.
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list