pool: Fix compiler warning on mingw64
authorVictor Toso <me@victortoso.com>
Tue, 8 Nov 2016 15:58:53 +0000 (16:58 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 9 Nov 2016 07:23:05 +0000 (09:23 +0200)
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)) {
   ^~

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

gst/gstpoll.c

index 23bceab..1d5e8b7 100644 (file)
@@ -236,7 +236,9 @@ release_event (GstPoll * set)
   DWORD status;
   SetLastError (0);
   errno = 0;
-  if (status = WaitForSingleObject (set->wakeup_event, INFINITE)) {
+
+  status = WaitForSingleObject (set->wakeup_event, INFINITE);
+  if (status) {
     const gchar *reason = "unknown";
     gchar msg[1024] = "<unknown>";
     switch (status) {