From 17f9ac565753f439bc43fe4c65623decc7330eba Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 1 Jul 2016 22:34:59 +1000 Subject: [PATCH] gstinfo: Avoid gcc 6 warning that breaks the tests build gcc 6 has problems detecting and avoiding throwing a warning for tautological compares in macros (they should only trigger for compares outside macros). Avoid them with a nasty cast of one parameter to void * https://bugzilla.gnome.org/show_bug.cgi?id=764526 --- gst/gstinfo.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gst/gstinfo.h b/gst/gstinfo.h index 27c3f9df85..d2fd7e48d1 100644 --- a/gst/gstinfo.h +++ b/gst/gstinfo.h @@ -415,9 +415,11 @@ gchar * gst_info_strdup_printf (const gchar *format, ...) G_GNUC_PRINTF #ifndef GST_DISABLE_GST_DEBUG +/* cast to void * avoids a warning with gcc 6 + * see https://bugzilla.gnome.org/show_bug.cgi?id=764526 */ #define gst_debug_add_log_function(func,data,notify) \ G_STMT_START{ \ - if (func == gst_debug_log_default) { \ + if (func == (void *) gst_debug_log_default) { \ gst_debug_add_log_function(NULL,data,notify); \ } else { \ gst_debug_add_log_function(func,data,notify); \ @@ -425,7 +427,7 @@ G_STMT_START{ \ }G_STMT_END #define gst_debug_remove_log_function(func) \ - (func == gst_debug_log_default) ? \ + (func == (void *) gst_debug_log_default) ? \ gst_debug_remove_log_function(NULL) : \ gst_debug_remove_log_function(func)