summaryrefslogtreecommitdiff
path: root/gst/gstformat.c
diff options
context:
space:
mode:
authorJosep Torra <n770galaxy@gmail.com>2011-08-16 22:29:59 +0200
committerJosep Torra <n770galaxy@gmail.com>2011-08-26 14:11:13 +0200
commit11e287529d507a66d09533b25d34fe2a55b57118 (patch)
tree6c3d80923d8449b27168a3dfc840ffb707dd8146 /gst/gstformat.c
parent0c0dc0441fd9a6c084892cb8064c4ece5295aac9 (diff)
downloadgstreamer-11e287529d507a66d09533b25d34fe2a55b57118.tar.gz
format: use GST_FORMAT_UNDEFINED and few casts to GstFormat
Fixes warning #188: enumerated type mixed with another type reported by ICC.
Diffstat (limited to 'gst/gstformat.c')
-rw-r--r--gst/gstformat.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gst/gstformat.c b/gst/gstformat.c
index 263fa1d307..e3bbba945c 100644
--- a/gst/gstformat.c
+++ b/gst/gstformat.c
@@ -49,7 +49,7 @@ static GstFormatDefinition standard_definitions[] = {
{GST_FORMAT_TIME, "time", "Time", 0},
{GST_FORMAT_BUFFERS, "buffers", "Buffers", 0},
{GST_FORMAT_PERCENT, "percent", "Percent", 0},
- {0, NULL, NULL, 0}
+ {GST_FORMAT_UNDEFINED, NULL, NULL, 0}
};
void
@@ -144,8 +144,8 @@ gst_format_register (const gchar * nick, const gchar * description)
GstFormatDefinition *format;
GstFormat query;
- g_return_val_if_fail (nick != NULL, 0);
- g_return_val_if_fail (description != NULL, 0);
+ g_return_val_if_fail (nick != NULL, GST_FORMAT_UNDEFINED);
+ g_return_val_if_fail (description != NULL, GST_FORMAT_UNDEFINED);
query = gst_format_get_by_nick (nick);
if (query != GST_FORMAT_UNDEFINED)
@@ -153,7 +153,7 @@ gst_format_register (const gchar * nick, const gchar * description)
g_static_mutex_lock (&mutex);
format = g_slice_new (GstFormatDefinition);
- format->value = _n_values;
+ format->value = (GstFormat) _n_values;
format->nick = g_strdup (nick);
format->description = g_strdup (description);
format->quark = g_quark_from_static_string (format->nick);
@@ -182,7 +182,7 @@ gst_format_get_by_nick (const gchar * nick)
{
GstFormatDefinition *format;
- g_return_val_if_fail (nick != NULL, 0);
+ g_return_val_if_fail (nick != NULL, GST_FORMAT_UNDEFINED);
g_static_mutex_lock (&mutex);
format = g_hash_table_lookup (_nick_to_format, nick);