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 789180 - 3.92.1: fails to build because of Werror=return-type in translate_notify_type
3.92.1: fails to build because of Werror=return-type in translate_notify_type
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
3.92.x
Other Linux
: Normal major
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-10-18 23:21 UTC by Jeremy Bicha
Modified: 2017-10-26 22:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jeremy Bicha 2017-10-18 23:21:44 UTC
Ubuntu 17.10
gtk+ 3.92.1
meson 0.42.1
gcc 7.2.0-8ubuntu3

Build log excerpt
================

GTK+ 3.92.1 (4.0)

  Enabled backends: x11
    Vulkan support: true
             Tests: true
     Documentation: false
             Demos: true
Directories:
            prefix: /usr
        includedir: /usr/include
            libdir: /usr/lib/x86_64-linux-gnu
           datadir: /usr/share

[36/1357] cc  -Igdk/x11/gdk-x11@sta -Igdk/x11 -I../../../gdk/x11 -I. -I../../../ -Igdk -I../../../gdk -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/harfbuzz -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=gnu99 -DG_LOG_USE_STRUCTURED=1 -DGLIB_MIN_REQUIRED_VERSION=GLIB_VERSION_2_52 -DGLIB_MAX_ALLOWED_VERSION=GLIB_VERSION_2_54 '-DGTK_VERSION="3.92.1"' -D_GNU_SOURCE -DG_DISABLE_ASSERT -DG_DISABLE_CAST_CHECKS -DG_DISABLE_CHECKS -g -O2 -fdebug-prefix-map=/build/gtk+4.0-QSQJsV/gtk+4.0-3.92.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -DGDK_COMPILATION '-DG_LOG_DOMAIN="Gdk"' -fno-strict-aliasing -Wpointer-arith -Wmissing-declarations -Wimplicit-function-declaration -Wformat=2 -Wformat-nonliteral -Wformat-security -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wundef -Wunused -Wcast-align -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-include-dirs -Wlogical-op -Wswitch-default -Wswitch-enum -Werror=redundant-decls -Werror=implicit -Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces -Werror=sequence-point -Werror=return-type -Werror=trigraphs -Werror=array-bounds -Werror=write-strings -Werror=address -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=empty-body -Werror=write-strings -fvisibility=hidden -MMD -MQ 'gdk/x11/gdk-x11@sta/gdkdevicemanager-xi2.c.o' -MF 'gdk/x11/gdk-x11@sta/gdkdevicemanager-xi2.c.o.d' -o 'gdk/x11/gdk-x11@sta/gdkdevicemanager-xi2.c.o' -c ../../../gdk/x11/gdkdevicemanager-xi2.c
FAILED: gdk/x11/gdk-x11@sta/gdkdevicemanager-xi2.c.o 
cc  -Igdk/x11/gdk-x11@sta -Igdk/x11 -I../../../gdk/x11 -I. -I../../../ -Igdk -I../../../gdk -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/harfbuzz -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=gnu99 -DG_LOG_USE_STRUCTURED=1 -DGLIB_MIN_REQUIRED_VERSION=GLIB_VERSION_2_52 -DGLIB_MAX_ALLOWED_VERSION=GLIB_VERSION_2_54 '-DGTK_VERSION="3.92.1"' -D_GNU_SOURCE -DG_DISABLE_ASSERT -DG_DISABLE_CAST_CHECKS -DG_DISABLE_CHECKS -g -O2 -fdebug-prefix-map=/build/gtk+4.0-QSQJsV/gtk+4.0-3.92.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -DGDK_COMPILATION '-DG_LOG_DOMAIN="Gdk"' -fno-strict-aliasing -Wpointer-arith -Wmissing-declarations -Wimplicit-function-declaration -Wformat=2 -Wformat-nonliteral -Wformat-security -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wundef -Wunused -Wcast-align -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-include-dirs -Wlogical-op -Wswitch-default -Wswitch-enum -Werror=redundant-decls -Werror=implicit -Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces -Werror=sequence-point -Werror=return-type -Werror=trigraphs -Werror=array-bounds -Werror=write-strings -Werror=address -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=empty-body -Werror=write-strings -fvisibility=hidden -MMD -MQ 'gdk/x11/gdk-x11@sta/gdkdevicemanager-xi2.c.o' -MF 'gdk/x11/gdk-x11@sta/gdkdevicemanager-xi2.c.o.d' -o 'gdk/x11/gdk-x11@sta/gdkdevicemanager-xi2.c.o' -c ../../../gdk/x11/gdkdevicemanager-xi2.c
../../../gdk/x11/gdkdevicemanager-xi2.c: In function ‘translate_crossing_mode’:
../../../gdk/x11/gdkdevicemanager-xi2.c:1072:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
../../../gdk/x11/gdkdevicemanager-xi2.c: In function ‘translate_notify_type’:
../../../gdk/x11/gdkdevicemanager-xi2.c:1092:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
cc1: some warnings being treated as errors

Other Info
==========
If I remove the -Werror=retry-type rule from line 259 of meson.build, the build completes successfully.
Comment 1 Dominique Leuenberger 2017-10-25 11:00:02 UTC
For a test I disabled -Werror (I know that our brp check catches them anyway) and I get a better overview where all we miss to return values:

 E: gtk4 no-return-in-nonvoid-function ../gdk/wayland/gdkwindow-wayland.c:1620, 1653
 E: gtk4 no-return-in-nonvoid-function ../gdk/x11/gdkdevicemanager-core-x11.c:269, 289
 E: gtk4 no-return-in-nonvoid-function ../gdk/x11/gdkdevicemanager-xi2.c:1072, 1092
 E: gtk4 no-return-in-nonvoid-function ../gtk/gtkcssselector.c:880
 E: gtk4 no-return-in-nonvoid-function ../gtk/inspector/general.c:506
Comment 2 Emmanuele Bassi (:ebassi) 2017-10-25 11:06:34 UTC
Should have been fixed in master:

 - https://git.gnome.org/browse/gtk+/commit/?id=46f475664d66e25f0cc4212786c441f929a91d05
 - https://git.gnome.org/browse/gtk+/commit/?id=8549e62d8595bb6f94b51f2051f8542e357f236b
 - https://git.gnome.org/browse/gtk+/commit/?id=373b407bd26a940072173e0a509038185b63e936

This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.
Comment 3 Jeremy Bicha 2017-10-26 22:35:01 UTC
Thank you. I can confirm that I can't duplicate this bug any more after cherry-picking those commits.