[Bug 754755] playbin: Compiler warning with 64bit Windows target MinGW, cast to pointer from integer of different size

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Sep 9 07:03:00 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=754755

Kouhei Sutou <kou at cozmixng.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kou at cozmixng.org

--- Comment #2 from Kouhei Sutou <kou at cozmixng.org> ---
Unfortunately, GULONG_TO_PINTER() isn't provided by GLib.

But GUINT_TO_POINTER() works with gulong because GUINT_TO_PINTER() casts to
gulong (or guint64) and then casts to gpointer.

https://developer.gnome.org/glib/stable/glib-Type-Conversion-Macros.html#GUINT-TO-POINTER:CAPS

> #define GUINT_TO_POINTER(u) ((gpointer) (gulong) (u))


GUINT_TO_POINTER() definition is different for 32bit Windows and 64bit Windows:

For 32bit Windows:

https://git.gnome.org/browse/glib/tree/glib/glibconfig.h.win32.in#n122

> #define GUINT_TO_POINTER(u)	((gpointer)  (u))

It directly casts to gpointer.

For 64bit Windows:

https://git.gnome.org/browse/glib/tree/glib/glibconfig.h.win32.in#n137

> #define GUINT_TO_POINTER(u)	((gpointer) (guint64) (u))

It casts to guint64 and then casts to gpointer.

-- 
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