GNOME Bugzilla – Bug 638900
[GstPoll] Doesn't compile with MinGW
Last modified: 2011-01-11 12:49:57 UTC
When I try to compile GStreamer with MinGW GCC 4.5.0, I get the following error: cc1: warnings being treated as errors gstpoll.c: In function 'gst_poll_get_read_gpollfd': gstpoll.c:692:10: error: assignment makes integer from pointer without a cast The attached patch adds casts to avoid the warning.
Created attachment 177741 [details] [review] Fix warning on MinGW
Created attachment 177802 [details] [review] patch Better, see definition of GPollFD for details.
(In reply to comment #2) > Better, see definition of GPollFD for details. Your patch compiles, but I still get a warning (compiling for 32-bit Windows): gstpoll.c:692:12: warning: cast from pointer to integer of different size
> Better, see definition of GPollFD for details. David: why is your patch better? The definition of GPollFD is (and has always been afaict): struct _GPollFD { #if defined (G_OS_WIN32) && GLIB_SIZEOF_VOID_P == 8 gint64 fd; #else gint fd; #endif gushort events; gushort revents; }; which is what the original patch tries to take into account. I think I'll go with that for now and see what the win32 build bot says.
commit 0645c498f0adde39b17b2df55b7a982fff5795fa Author: Raimo Järvi <raimo.jarvi@gmail.com> Date: Tue Jan 11 12:46:31 2011 +0000 gstpoll: fix compiler warning with MingW gstpoll.c: In function 'gst_poll_get_read_gpollfd': gstpoll.c:692:10: warning: assignment makes integer from pointer without a cast https://bugzilla.gnome.org/show_bug.cgi?id=638900