[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
Fri Sep 11 06:49:54 PDT 2015


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

--- Comment #6 from Kouhei Sutou <kou at cozmixng.org> ---
----
typedef unsigned long   gulong;
typedef void* gpointer;

#ifdef _WIN64
#  include <stdint.h>
typedef unsigned __int64 guintptr;
#elif defined(_WIN32)
typedef unsigned int guintptr;
#else
typedef unsigned long guintptr;
#endif

#define GST_ULONG_TO_POINTER(x) ((gpointer) (guintptr) (x))

int
main(void)
{
  gulong x = 0;
  gpointer y;

  y = GST_ULONG_TO_POINTER(x);

  return 0;
}
----

----
% gcc -Wall -Wno-unused-but-set-variable -o a a.c
% i686-w64-mingw32-gcc -Wall -Wno-unused-but-set-variable -o a.exe a.c
% x86_64-w64-mingw32-gcc -Wall -Wno-unused-but-set-variable -o a.exe a.c
----

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