GNOME Bugzilla – Bug 783465
Bijiben (tarball) failes to build, error: this statement may fall through [-Werror=implicit-fallthrough=]
Last modified: 2017-06-11 18:35:31 UTC
[ 45s] make[4]: Entering directory '/home/abuild/rpmbuild/BUILD/bijiben-3.24.0/src' [ 45s] CC bijiben-bjb-bijiben.o [ 45s] CC bijiben-bjb-app-menu.o [ 45s] CC bijiben-bjb-color-button.o [ 45s] CC bijiben-bjb-controller.o [ 45s] CC bijiben-bjb-debug.o [ 46s] CC bijiben-bjb-editor-toolbar.o [ 46s] CC bijiben-bjb-empty-results-box.o [ 46s] CC bijiben-bjb-import-dialog.o [ 46s] CC bijiben-bjb-load-more-button.o [ 46s] CC bijiben-bjb-main.o [ 47s] CC bijiben-bjb-main-toolbar.o [ 47s] CC bijiben-bjb-main-view.o [ 47s] CC bijiben-bjb-note-view.o [ 47s] CC bijiben-bjb-organize-dialog.o [ 47s] bjb-main-toolbar.c: In function 'bjb_main_toolbar_get_property': [ 47s] bjb-main-toolbar.c:1133:7: error: this statement may fall through [-Werror=implicit-fallthrough=] [ 47s] g_value_set_object (value, self->priv->parent); [ 47s] ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [ 47s] bjb-main-toolbar.c:1134:5: note: here [ 47s] default: [ 47s] ^~~~~~~ [ 48s] cc1: all warnings being treated as errors [ 48s] make[4]: *** [Makefile:900: bijiben-bjb-main-toolbar.o] Error 1 [ 48s] make[4]: *** Waiting for unfinished jobs.... This must be a recent change as I have a gitcheckout from changesrevision">1778d9e68b17515946218d97f36a4f912fdc2ef8 that builds fine. GCC7 is the compiler used here.
Ah.. right - I was passing --disable-Werror in the gitcheckout, so scratch the info that a recent build passes. I see the tarball builds alwell when passing --disable-Werror to configure, but I assume that should not be needed?
implicit-fallthrough is a new gcc7 warning/error, so if one is using gcc6 or older, one would probably get the tarball to build just fine.
Created attachment 353573 [details] [review] main-toolbar: Missing break in case statement gcc7 is complainting about an implicit-fallthrough situation: a missing break in a case statement. This commit adds that to the code.
Review of attachment 353573 [details] [review]: Pushed to master.