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 638900 - [GstPoll] Doesn't compile with MinGW
[GstPoll] Doesn't compile with MinGW
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Windows
: Normal blocker
: 0.10.32
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-01-07 11:33 UTC by Raimo Järvi
Modified: 2011-01-11 12:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix warning on MinGW (471 bytes, patch)
2011-01-07 11:34 UTC, Raimo Järvi
committed Details | Review
patch (807 bytes, patch)
2011-01-08 03:13 UTC, David Schleef
reviewed Details | Review

Description Raimo Järvi 2011-01-07 11:33:12 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.
Comment 1 Raimo Järvi 2011-01-07 11:34:41 UTC
Created attachment 177741 [details] [review]
Fix warning on MinGW
Comment 2 David Schleef 2011-01-08 03:13:51 UTC
Created attachment 177802 [details] [review]
patch

Better, see definition of GPollFD for details.
Comment 3 Raimo Järvi 2011-01-08 11:47:33 UTC
(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
Comment 4 Tim-Philipp Müller 2011-01-11 12:42:32 UTC
> 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.
Comment 5 Tim-Philipp Müller 2011-01-11 12:48:53 UTC
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