mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 06:26:23 +00:00
gst: use GstDebugLevel enum type to fix a warning building with ICC
https://bugzilla.gnome.org/show_bug.cgi?id=656265
This commit is contained in:
parent
232a651d68
commit
abda75bcf5
1 changed files with 6 additions and 6 deletions
12
gst/gst.c
12
gst/gst.c
|
@ -217,7 +217,7 @@ parse_debug_category (gchar * str, const gchar ** category)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
parse_debug_level (gchar * str, gint * level)
|
parse_debug_level (gchar * str, GstDebugLevel * level)
|
||||||
{
|
{
|
||||||
if (!str)
|
if (!str)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -227,7 +227,7 @@ parse_debug_level (gchar * str, gint * level)
|
||||||
|
|
||||||
if (str[0] != NUL && str[1] == NUL
|
if (str[0] != NUL && str[1] == NUL
|
||||||
&& str[0] >= '0' && str[0] < '0' + GST_LEVEL_COUNT) {
|
&& str[0] >= '0' && str[0] < '0' + GST_LEVEL_COUNT) {
|
||||||
*level = str[0] - '0';
|
*level = (GstDebugLevel) (str[0] - '0');
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,7 +249,7 @@ parse_debug_list (const gchar * list)
|
||||||
gchar **values = g_strsplit (*walk, ":", 2);
|
gchar **values = g_strsplit (*walk, ":", 2);
|
||||||
|
|
||||||
if (values[0] && values[1]) {
|
if (values[0] && values[1]) {
|
||||||
gint level;
|
GstDebugLevel level;
|
||||||
const gchar *category;
|
const gchar *category;
|
||||||
|
|
||||||
if (parse_debug_category (values[0], &category)
|
if (parse_debug_category (values[0], &category)
|
||||||
|
@ -259,7 +259,7 @@ parse_debug_list (const gchar * list)
|
||||||
|
|
||||||
g_strfreev (values);
|
g_strfreev (values);
|
||||||
} else {
|
} else {
|
||||||
gint level;
|
GstDebugLevel level;
|
||||||
|
|
||||||
if (parse_debug_level (*walk, &level))
|
if (parse_debug_level (*walk, &level))
|
||||||
gst_debug_set_default_threshold (level);
|
gst_debug_set_default_threshold (level);
|
||||||
|
@ -902,9 +902,9 @@ parse_one_option (gint opt, const gchar * arg, GError ** err)
|
||||||
}
|
}
|
||||||
#ifndef GST_DISABLE_GST_DEBUG
|
#ifndef GST_DISABLE_GST_DEBUG
|
||||||
case ARG_DEBUG_LEVEL:{
|
case ARG_DEBUG_LEVEL:{
|
||||||
gint tmp = 0;
|
GstDebugLevel tmp = GST_LEVEL_NONE;
|
||||||
|
|
||||||
tmp = strtol (arg, NULL, 0);
|
tmp = (GstDebugLevel) strtol (arg, NULL, 0);
|
||||||
if (tmp >= 0 && tmp < GST_LEVEL_COUNT) {
|
if (tmp >= 0 && tmp < GST_LEVEL_COUNT) {
|
||||||
gst_debug_set_default_threshold (tmp);
|
gst_debug_set_default_threshold (tmp);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue