From 10e6f6b6cb37e2398eccbd775c770e6699b27029 Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Thu, 7 Mar 2019 10:15:16 +0100 Subject: [PATCH] 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. --- ext/fluidsynth/gstfluiddec.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/ext/fluidsynth/gstfluiddec.c b/ext/fluidsynth/gstfluiddec.c index a98b5f90bb..c9514dba08 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);