From a685bfbc38ddf9b08b9213ab09dcc5130368422f Mon Sep 17 00:00:00 2001 From: Klaus Ethgen Date: Sun, 17 Sep 2017 15:53:47 +0100 Subject: [PATCH] Fix the implicit-fallthrough stuff in code First, this flag was not supported by older gcc. And second and more important, there _was_ a bug with a lost break in 9643a2546bcc. Combined with a unreachable code segment. --- configure.in | 2 +- src/ui_bookmark.c | 1 + src/ui_pathsel.c | 1 + src/utilops.c | 3 +-- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/configure.in b/configure.in index 506debbbf..f9e76b984 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_PREREQ(2.57) AC_INIT([geeqie], m4_esyscmd_s(git rev-parse --quiet --verify --short HEAD), [geeqie-devel@lists.sourceforge.net], [], [http://www.geeqie.org/]) # Add -Werror to the default CFLAGS -CFLAGS+=" -Werror -Wno-error=deprecated-declarations -Wno-error=sign-compare -Wno-error=implicit-fallthrough -Wno-error=return-type" +CFLAGS+=" -Werror -Wno-error=deprecated-declarations -Wno-error=sign-compare -Wno-error=return-type" # Check for rightly dirs AC_CONFIG_SRCDIR([src/main.c]) diff --git a/src/ui_bookmark.c b/src/ui_bookmark.c index 4afad6336..91ee6baa6 100644 --- a/src/ui_bookmark.c +++ b/src/ui_bookmark.c @@ -450,6 +450,7 @@ static gboolean bookmark_keypress_cb(GtkWidget *button, GdkEventKey *event, gpoi { case GDK_KEY_F10: if (!(event->state & GDK_CONTROL_MASK)) return FALSE; + /* fall through */ case GDK_KEY_Menu: bookmark_menu_popup(bm, button, 0, event->time, TRUE); return TRUE; diff --git a/src/ui_pathsel.c b/src/ui_pathsel.c index ccd5249b6..73568cdff 100644 --- a/src/ui_pathsel.c +++ b/src/ui_pathsel.c @@ -698,6 +698,7 @@ static gboolean dest_keypress_cb(GtkWidget *view, GdkEventKey *event, gpointer d { case GDK_KEY_F10: if (!(event->state & GDK_CONTROL_MASK)) return FALSE; + /* fall through */ case GDK_KEY_Menu: dest_view_store_selection(dd, GTK_TREE_VIEW(view)); dest_popup_menu(dd, GTK_TREE_VIEW(view), 0, event->time, TRUE); diff --git a/src/utilops.c b/src/utilops.c index f2d5ed0ed..8e40f11c9 100644 --- a/src/utilops.c +++ b/src/utilops.c @@ -1106,6 +1106,7 @@ static void file_util_dest_folder_update_path(UtilityData *ud) { case UTILITY_TYPE_COPY: file_data_sc_update_ci_copy_list(ud->flist, ud->dest_path); + break; case UTILITY_TYPE_MOVE: file_data_sc_update_ci_move_list(ud->flist, ud->dest_path); break; @@ -1845,8 +1846,6 @@ void file_util_dialog_run(UtilityData *ud) case UTILITY_PHASE_ENTERING: file_util_check_ci(ud); break; - - ud->phase = UTILITY_PHASE_CHECKED; case UTILITY_PHASE_CHECKED: file_util_perform_ci(ud); break; -- 2.30.2