Fix the implicit-fallthrough stuff in code
authorKlaus Ethgen <[email protected]>
Sun, 17 Sep 2017 14:53:47 +0000 (15:53 +0100)
committerKlaus Ethgen <[email protected]>
Sun, 17 Sep 2017 14:53:47 +0000 (15:53 +0100)
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
src/ui_bookmark.c
src/ui_pathsel.c
src/utilops.c

index 506debbbf8931d8e7f0b028f119e4625ba6b40e8..f9e76b98495be66994cf8255fcd99364daf014f4 100644 (file)
@@ -18,7 +18,7 @@ AC_PREREQ(2.57)
 AC_INIT([geeqie], m4_esyscmd_s(git rev-parse --quiet --verify --short HEAD), [[email protected]], [], [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])
index 4afad6336fa4403a56820bae2cdb56f1ca943b5c..91ee6baa61a28d3bc749455d32e076a2f70f6585 100644 (file)
@@ -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;
index ccd5249b6e4992cb314ccd5dbd3993f2139df16a..73568cdfff0a8c4ae64fe6c97cf7607a611a8710 100644 (file)
@@ -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);
index f2d5ed0ed50230ab848ac9092487f83cd5eca2fa..8e40f11c9ef4f4e9abc1b9f8b9e8192692e5d7ef 100644 (file)
@@ -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;