GNOME Bugzilla – Bug 764526
Build broken with gcc 6.0
Last modified: 2016-07-04 14:16:07 UTC
I have a new build problem since upgrading the other day and getting gcc 6.0: [gst-1.0] [jan@pepper gstreamer]$ make check .... CC gst/gstinfo.o gst/gstinfo.c: In function ‘info_ptr_format_printf_extension’: gst/gstinfo.c:59:26: error: self-comparison always evaluates to true [-Werror=tautological-compare] gst_debug_remove_log_function (gst_debug_log_default); ^~ gst/gstinfo.c:134:33: error: self-comparison always evaluates to true [-Werror=tautological-compare] gst_debug_add_log_function (gst_debug_log_default, NULL, NULL); ^~ gst/gstinfo.c: In function ‘info_segment_format_printf_extension’: gst/gstinfo.c:145:26: error: self-comparison always evaluates to true [-Werror=tautological-compare] gst_debug_remove_log_function (gst_debug_log_default); ^~ gst/gstinfo.c:212:33: error: self-comparison always evaluates to true [-Werror=tautological-compare] gst_debug_add_log_function (gst_debug_log_default, NULL, NULL); ^~ gst/gstinfo.c: In function ‘info_log_handler’: gst/gstinfo.c:222:36: error: self-comparison always evaluates to true [-Werror=tautological-compare] removed = gst_debug_remove_log_function (gst_debug_log_default); ^~ gst/gstinfo.c: In function ‘info_old_printf_extensions’: gst/gstinfo.c:292:26: error: self-comparison always evaluates to true [-Werror=tautological-compare] gst_debug_remove_log_function (gst_debug_log_default); ^~ gst/gstinfo.c:327:33: error: self-comparison always evaluates to true [-Werror=tautological-compare] gst_debug_add_log_function (gst_debug_log_default, NULL, NULL); ^~ cc1: all warnings being treated as errors Makefile:2466: recipe for target 'gst/gstinfo.o' failed I don't know why the warning only triggers in the testsuite, but not when building GStreamer itself. It may be related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67030 - which seems to imply that macro expansions shouldn't trigger this warning.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70477 too
commit 17f9ac565753f439bc43fe4c65623decc7330eba Author: Jan Schmidt <jan@centricular.com> Date: Fri Jul 1 22:34:59 2016 +1000 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
*** Bug 767998 has been marked as a duplicate of this bug. ***