gststate: explicitly cast to the enum type
authorJosep Torra <n770galaxy@gmail.com>
Wed, 10 Aug 2011 09:07:49 +0000 (11:07 +0200)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Mon, 15 Aug 2011 20:15:12 +0000 (21:15 +0100)
Fixes warning #188: enumerated type mixed with another type reported by ICC.

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

gst/gstelement.h

index 74a0e2c..f0d2353 100644 (file)
@@ -150,7 +150,7 @@ typedef enum {
  * Given a current state @cur and a target state @pending, calculate the next (intermediate)
  * #GstState.
  */
-#define GST_STATE_GET_NEXT(cur,pending)         ((cur) + __GST_SIGN ((gint)(pending) - (gint)(cur)))
+#define GST_STATE_GET_NEXT(cur,pending)         ((GstState)((cur) + __GST_SIGN ((gint)(pending) - (gint)(cur))))
 /**
  * GST_STATE_TRANSITION:
  * @cur: A current state