[PATCH] info: fix typecast error for gst_debug_add/remove_log_function
Eric Nelson
eric at nelint.com
Tue Apr 2 22:22:20 UTC 2019
Adding Wim and Tim to the CC list.
On 4/2/19 3:15 PM, Eric Nelson wrote:
> Using GCC 7 or later with pedantic flag will cause warnings about
> comparisons between "void *" and a function pointer.
>
> We should change this to force type safety anyway.
>
> Signed-off-by: Eric Nelson <eric at nelint.com>
> ---
> gst/gstinfo.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gst/gstinfo.h b/gst/gstinfo.h
> index 82e4f9b..f0ed1f9 100644
> --- a/gst/gstinfo.h
> +++ b/gst/gstinfo.h
> @@ -500,7 +500,7 @@ void gst_printerrln (const gchar * format, ...) G_GNUC_PRINT
> * see https://bugzilla.gnome.org/show_bug.cgi?id=764526 */
> #define gst_debug_add_log_function(func,data,notify) \
> G_STMT_START{ \
> - if ((func) == (void *) gst_debug_log_default) { \
> + if ((func) == gst_debug_log_default) { \
> gst_debug_add_log_function(NULL,data,notify); \
> } else { \
> gst_debug_add_log_function(func,data,notify); \
> @@ -508,7 +508,7 @@ G_STMT_START{ \
> }G_STMT_END
>
> #define gst_debug_remove_log_function(func) \
> - ((func) == (void *) gst_debug_log_default) ? \
> + ((func) == gst_debug_log_default) ? \
> gst_debug_remove_log_function(NULL) : \
> gst_debug_remove_log_function(func)
>
>
More information about the gstreamer-devel
mailing list