fluidsynth: Avoid Wincompatible-pointer-types with 2.0.4

In 2.0.4, the message parameter has "const char*" type. Add a cast to
avoid a warning with older fluidsynth.
This commit is contained in:
Jan Alexander Steffens (heftig) 2019-03-07 10:15:16 +01:00
parent 55abe39d76
commit 10e6f6b6cb
No known key found for this signature in database
GPG key ID: DE5E0C5F25941CA5

View file

@ -114,25 +114,26 @@ G_DEFINE_TYPE (GstFluidDec, gst_fluid_dec, GST_TYPE_ELEMENT);
/* fluid_synth log handler */ /* fluid_synth log handler */
static void static void
gst_fluid_synth_error_log_function (int level, char *message, void *data) gst_fluid_synth_error_log_function (int level, const char *message, void *data)
{ {
GST_ERROR ("%s", message); GST_ERROR ("%s", message);
} }
static void static void
gst_fluid_synth_warning_log_function (int level, char *message, void *data) gst_fluid_synth_warning_log_function (int level, const char *message,
void *data)
{ {
GST_WARNING ("%s", message); GST_WARNING ("%s", message);
} }
static void static void
gst_fluid_synth_info_log_function (int level, char *message, void *data) gst_fluid_synth_info_log_function (int level, const char *message, void *data)
{ {
GST_INFO ("%s", message); GST_INFO ("%s", message);
} }
static void static void
gst_fluid_synth_debug_log_function (int level, char *message, void *data) gst_fluid_synth_debug_log_function (int level, const char *message, void *data)
{ {
GST_DEBUG ("%s", message); GST_DEBUG ("%s", message);
} }
@ -187,14 +188,16 @@ gst_fluid_dec_class_init (GstFluidDecClass * klass)
gstelement_class->change_state = gst_fluid_dec_change_state; gstelement_class->change_state = gst_fluid_dec_change_state;
#ifndef GST_DISABLE_GST_DEBUG #ifndef GST_DISABLE_GST_DEBUG
fluid_set_log_function (FLUID_PANIC, gst_fluid_synth_error_log_function, fluid_set_log_function (FLUID_PANIC,
NULL); (fluid_log_function_t) gst_fluid_synth_error_log_function, NULL);
fluid_set_log_function (FLUID_ERR, gst_fluid_synth_warning_log_function, fluid_set_log_function (FLUID_ERR,
NULL); (fluid_log_function_t) gst_fluid_synth_warning_log_function, NULL);
fluid_set_log_function (FLUID_WARN, gst_fluid_synth_warning_log_function, fluid_set_log_function (FLUID_WARN,
NULL); (fluid_log_function_t) gst_fluid_synth_warning_log_function, NULL);
fluid_set_log_function (FLUID_INFO, gst_fluid_synth_info_log_function, NULL); fluid_set_log_function (FLUID_INFO,
fluid_set_log_function (FLUID_DBG, gst_fluid_synth_debug_log_function, NULL); (fluid_log_function_t) gst_fluid_synth_info_log_function, NULL);
fluid_set_log_function (FLUID_DBG,
(fluid_log_function_t) gst_fluid_synth_debug_log_function, NULL);
#else #else
fluid_set_log_function (FLUID_PANIC, NULL, NULL); fluid_set_log_function (FLUID_PANIC, NULL, NULL);
fluid_set_log_function (FLUID_ERR, NULL, NULL); fluid_set_log_function (FLUID_ERR, NULL, NULL);