After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 764526 - Build broken with gcc 6.0
Build broken with gcc 6.0
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 1.9.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 767998 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-04-03 10:11 UTC by Jan Schmidt
Modified: 2016-07-04 14:16 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jan Schmidt 2016-04-03 10:11:25 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.
Comment 1 Jan Schmidt 2016-04-03 10:11:59 UTC
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70477 too
Comment 2 Jan Schmidt 2016-07-01 12:42:27 UTC
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
Comment 3 Guillaume Desmottes 2016-07-04 14:16:07 UTC
*** Bug 767998 has been marked as a duplicate of this bug. ***