event: explicitly cast to the right enum types

Fixes warning #188: enumerated type mixed with another type reported by ICC.

https://bugzilla.gnome.org/show_bug.cgi?id=656265
This commit is contained in:
Josep Torra 2011-08-09 23:42:26 +02:00 committed by Tim-Philipp Müller
parent 7b434c44bf
commit 89239d85cc

View file

@ -664,7 +664,7 @@ gst_event_parse_new_segment_full (GstEvent * event, gboolean * update,
g_value_get_double (gst_structure_id_get_value (structure, g_value_get_double (gst_structure_id_get_value (structure,
GST_QUARK (APPLIED_RATE))); GST_QUARK (APPLIED_RATE)));
if (G_LIKELY (format)) if (G_LIKELY (format))
*format = *format = (GstFormat)
g_value_get_enum (gst_structure_id_get_value (structure, g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (FORMAT))); GST_QUARK (FORMAT)));
if (G_LIKELY (start)) if (G_LIKELY (start))
@ -776,7 +776,7 @@ gst_event_parse_buffer_size (GstEvent * event, GstFormat * format,
structure = event->structure; structure = event->structure;
if (format) if (format)
*format = *format = (GstFormat)
g_value_get_enum (gst_structure_id_get_value (structure, g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (FORMAT))); GST_QUARK (FORMAT)));
if (minsize) if (minsize)
@ -940,7 +940,7 @@ gst_event_parse_qos_full (GstEvent * event, GstQOSType * type,
structure = event->structure; structure = event->structure;
if (type) if (type)
*type = *type = (GstQOSType)
g_value_get_enum (gst_structure_id_get_value (structure, g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (TYPE))); GST_QUARK (TYPE)));
if (proportion) if (proportion)
@ -1068,15 +1068,15 @@ gst_event_parse_seek (GstEvent * event, gdouble * rate,
g_value_get_double (gst_structure_id_get_value (structure, g_value_get_double (gst_structure_id_get_value (structure,
GST_QUARK (RATE))); GST_QUARK (RATE)));
if (format) if (format)
*format = *format = (GstFormat)
g_value_get_enum (gst_structure_id_get_value (structure, g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (FORMAT))); GST_QUARK (FORMAT)));
if (flags) if (flags)
*flags = *flags = (GstSeekFlags)
g_value_get_flags (gst_structure_id_get_value (structure, g_value_get_flags (gst_structure_id_get_value (structure,
GST_QUARK (FLAGS))); GST_QUARK (FLAGS)));
if (start_type) if (start_type)
*start_type = *start_type = (GstSeekType)
g_value_get_enum (gst_structure_id_get_value (structure, g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (CUR_TYPE))); GST_QUARK (CUR_TYPE)));
if (start) if (start)
@ -1084,7 +1084,7 @@ gst_event_parse_seek (GstEvent * event, gdouble * rate,
g_value_get_int64 (gst_structure_id_get_value (structure, g_value_get_int64 (gst_structure_id_get_value (structure,
GST_QUARK (CUR))); GST_QUARK (CUR)));
if (stop_type) if (stop_type)
*stop_type = *stop_type = (GstSeekType)
g_value_get_enum (gst_structure_id_get_value (structure, g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (STOP_TYPE))); GST_QUARK (STOP_TYPE)));
if (stop) if (stop)
@ -1234,7 +1234,8 @@ gst_event_parse_step (GstEvent * event, GstFormat * format, guint64 * amount,
structure = event->structure; structure = event->structure;
if (format) if (format)
*format = g_value_get_enum (gst_structure_id_get_value (structure, *format =
(GstFormat) g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (FORMAT))); GST_QUARK (FORMAT)));
if (amount) if (amount)
*amount = g_value_get_uint64 (gst_structure_id_get_value (structure, *amount = g_value_get_uint64 (gst_structure_id_get_value (structure,