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 774108 - Two warnings while building with mingw64
Two warnings while building with mingw64
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other All
: Normal normal
: 1.10.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-11-08 16:26 UTC by Victor Toso
Modified: 2016-11-12 08:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
pool: Fix compiler warning on mingw64 (1.06 KB, patch)
2016-11-08 16:26 UTC, Victor Toso
committed Details | Review
tests: Fix compile warning on mingw64 (1.58 KB, patch)
2016-11-08 16:26 UTC, Victor Toso
none Details | Review
tests: Fix compile warning on mingw64 (1.32 KB, patch)
2016-11-09 13:24 UTC, Victor Toso
committed Details | Review

Description Victor Toso 2016-11-08 16:26:42 UTC
I saw the warnings while doing the Fedora mingw-gstreamer1 [0] build for F25 and
rawhide. Harmless warnings.

[0] http://koji.fedoraproject.org/koji/buildinfo?buildID=815128
Comment 1 Victor Toso 2016-11-08 16:26:46 UTC
Created attachment 339333 [details] [review]
pool: Fix compiler warning on mingw64

gstpoll.c: In function 'release_event':
gstpoll.c:239:3: error: suggest parentheses around assignment used as
          truth value [-Werror=parentheses]

   if (status = WaitForSingleObject (set->wakeup_event, INFINITE)) {
   ^~

Signed-off-by: Victor Toso <victortoso@redhat.com>
Comment 2 Victor Toso 2016-11-08 16:26:52 UTC
Created attachment 339334 [details] [review]
tests: Fix compile warning on mingw64

Use undef __MSVCRT_VERSION__ for the test as it will defined once again.

In file included from ../../libs/gst/net/gstntppacket.c:35:0,
                 from netclock-replay.c:25:
../../config.h:546:0: error: "__MSVCRT_VERSION__" redefined [-Werror]
 #define __MSVCRT_VERSION__ 0x0601

In file included from /usr/x86_64-w64-mingw32/sys-root/mingw/include/crtdefs.h:10:0,
                 from /usr/x86_64-w64-mingw32/sys-root/mingw/include/stdio.h:9,
                 from netclock-replay.c:21:
/usr/x86_64-w64-mingw32/sys-root/mingw/include/_mingw.h:220:0: note:
this is the location of the previous definition
 # define __MSVCRT_VERSION__ 0x0700

Signed-off-by: Victor Toso <victortoso@redhat.com>
Comment 3 Sebastian Dröge (slomo) 2016-11-09 07:24:21 UTC
Comment on attachment 339333 [details] [review]
pool: Fix compiler warning on mingw64

Attachment 339333 [details] pushed as 5571ad1 - pool: Fix compiler warning on mingw64
Comment 4 Sebastian Dröge (slomo) 2016-11-09 07:25:47 UTC
Review of attachment 339334 [details] [review]:

::: tests/misc/netclock-replay.c
@@ +23,3 @@
 /* We need the internal netclock estimation function to (re)run the code on
+ captured samples, plus its dependencies for the build to succeed. */
+#undef __MSVCRT_VERSION__

This will fail on non-Windows as it's not defined. The better solution would be to add at the very top of the source file:

> #ifdef HAVE_CONFIG_H
> #include "config.h"
> #endif

Before all other includes.
Comment 5 Victor Toso 2016-11-09 13:20:16 UTC
(In reply to Sebastian Dröge (slomo) from comment #4)
> Review of attachment 339334 [details] [review] [review]:
> 
> ::: tests/misc/netclock-replay.c
> @@ +23,3 @@
>  /* We need the internal netclock estimation function to (re)run the code on
> + captured samples, plus its dependencies for the build to succeed. */
> +#undef __MSVCRT_VERSION__
> 
> This will fail on non-Windows as it's not defined.

My bad in not testing this properly.

> The better solution would
> be to add at the very top of the source file:
> 
> > #ifdef HAVE_CONFIG_H
> > #include "config.h"
> > #endif
> 
> Before all other includes.

Ah, sure. I'll submit v2 shortly. Thanks!
Comment 6 Victor Toso 2016-11-09 13:24:20 UTC
Created attachment 339396 [details] [review]
tests: Fix compile warning on mingw64

In file included from ../../libs/gst/net/gstntppacket.c:35:0,
                 from netclock-replay.c:25:
../../config.h:546:0: error: "__MSVCRT_VERSION__" redefined [-Werror]
 #define __MSVCRT_VERSION__ 0x0601

In file included from /usr/x86_64-w64-mingw32/sys-root/mingw/include/crtdefs.h:10:0,
                 from /usr/x86_64-w64-mingw32/sys-root/mingw/include/stdio.h:9,
                 from netclock-replay.c:21:
/usr/x86_64-w64-mingw32/sys-root/mingw/include/_mingw.h:220:0: note:
this is the location of the previous definition
 # define __MSVCRT_VERSION__ 0x0700

Signed-off-by: Victor Toso <victortoso@redhat.com>
Comment 7 Sebastian Dröge (slomo) 2016-11-09 17:44:22 UTC
Attachment 339396 [details] pushed as cb9309f - tests: Fix compile warning on mingw64