summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Alexander Steffens (heftig) <jsteffens@make.tv>2019-03-07 10:15:16 +0100
committerJan Alexander Steffens (heftig) <jsteffens@make.tv>2019-03-07 10:17:30 +0100
commit10e6f6b6cb37e2398eccbd775c770e6699b27029 (patch)
tree261f3408e71e92f6d8cc6122351251e2d1a5500b
parent55abe39d76e51ce401cc654b3832e283fa71fbfa (diff)
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.
-rw-r--r--ext/fluidsynth/gstfluiddec.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/ext/fluidsynth/gstfluiddec.c b/ext/fluidsynth/gstfluiddec.c
index a98b5f90b..c9514dba0 100644
--- a/ext/fluidsynth/gstfluiddec.c
+++ b/ext/fluidsynth/gstfluiddec.c
@@ -114,25 +114,26 @@ G_DEFINE_TYPE (GstFluidDec, gst_fluid_dec, GST_TYPE_ELEMENT);
/* fluid_synth log handler */
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);
}
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);
}
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);
}
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);
}
@@ -187,14 +188,16 @@ gst_fluid_dec_class_init (GstFluidDecClass * klass)
gstelement_class->change_state = gst_fluid_dec_change_state;
#ifndef GST_DISABLE_GST_DEBUG
- fluid_set_log_function (FLUID_PANIC, gst_fluid_synth_error_log_function,
- NULL);
- fluid_set_log_function (FLUID_ERR, gst_fluid_synth_warning_log_function,
- NULL);
- fluid_set_log_function (FLUID_WARN, 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_DBG, gst_fluid_synth_debug_log_function, NULL);
+ fluid_set_log_function (FLUID_PANIC,
+ (fluid_log_function_t) gst_fluid_synth_error_log_function, NULL);
+ fluid_set_log_function (FLUID_ERR,
+ (fluid_log_function_t) gst_fluid_synth_warning_log_function, NULL);
+ fluid_set_log_function (FLUID_WARN,
+ (fluid_log_function_t) gst_fluid_synth_warning_log_function, NULL);
+ fluid_set_log_function (FLUID_INFO,
+ (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
fluid_set_log_function (FLUID_PANIC, NULL, NULL);
fluid_set_log_function (FLUID_ERR, NULL, NULL);