mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
libvisual: workaround clang warning
libvisual api expects a priv data pointer to be passed, though we know its going to be `GstDebugLevel`. ``` ../subprojects/gst-plugins-base/ext/libvisual/plugin.c:33:39: error: cast to smaller integer type 'GstDebugLevel' from 'void *' [-Werror,-Wvoid-pointer-to-enum-cast] GST_CAT_LEVEL_LOG (libvisual_debug, (GstDebugLevel) (priv), NULL, "%s - %s", ``` Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/975>
This commit is contained in:
parent
56e05f63f5
commit
ef884a2c5c
1 changed files with 7 additions and 6 deletions
|
@ -30,8 +30,8 @@ GST_DEBUG_CATEGORY (libvisual_debug);
|
|||
static void
|
||||
libvisual_log_handler (const char *message, const char *funcname, void *priv)
|
||||
{
|
||||
GST_CAT_LEVEL_LOG (libvisual_debug, (GstDebugLevel) (priv), NULL, "%s - %s",
|
||||
funcname, message);
|
||||
GST_CAT_LEVEL_LOG (libvisual_debug, (GstDebugLevel) GPOINTER_TO_INT (priv),
|
||||
NULL, "%s - %s", funcname, message);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -86,13 +86,14 @@ plugin_init (GstPlugin * plugin)
|
|||
#endif
|
||||
|
||||
visual_log_set_verboseness (VISUAL_LOG_VERBOSENESS_LOW);
|
||||
visual_log_set_info_handler (libvisual_log_handler, (void *) GST_LEVEL_INFO);
|
||||
visual_log_set_info_handler (libvisual_log_handler,
|
||||
GINT_TO_POINTER (GST_LEVEL_INFO));
|
||||
visual_log_set_warning_handler (libvisual_log_handler,
|
||||
(void *) GST_LEVEL_WARNING);
|
||||
GINT_TO_POINTER (GST_LEVEL_WARNING));
|
||||
visual_log_set_critical_handler (libvisual_log_handler,
|
||||
(void *) GST_LEVEL_ERROR);
|
||||
GINT_TO_POINTER (GST_LEVEL_ERROR));
|
||||
visual_log_set_error_handler (libvisual_log_handler,
|
||||
(void *) GST_LEVEL_ERROR);
|
||||
GINT_TO_POINTER (GST_LEVEL_ERROR));
|
||||
|
||||
if (!visual_is_initialized ())
|
||||
if (visual_init (NULL, NULL) != 0)
|
||||
|
|
Loading…
Reference in a new issue