build: fix implicit-fallthrough errors with clang
authorChristoph Reiter <reiter.christoph@gmail.com>
Thu, 26 Aug 2021 03:14:18 +0000 (05:14 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 31 Oct 2021 21:52:04 +0000 (17:52 -0400)
The clang build fails due to -Werror=implicit-fallthrough being
on by default and some fallthrough cases not being marked as such.

Use G_GNUC_FALLTHROUGH or duplicate the code in those cases.

gtk/gtkimcontextime.c

index c8378c836ee60feccf0eef94d503eaea7ee0f44c..8f09cde29d4fd9595b1c62039e989bc6e6e26fa9 100644 (file)
@@ -724,7 +724,7 @@ gtk_im_context_ime_focus_out (GtkIMContext *context)
             context_ime->priv->pretend_empty_preedit = FALSE;
             g_free (utf8str);
           }
-        /* fallthrough */
+        G_GNUC_FALLTHROUGH;
       case GTK_WIN32_IME_FOCUS_BEHAVIOR_DISCARD:
         gtk_im_context_ime_reset (context);
 
@@ -1054,7 +1054,7 @@ gtk_im_context_ime_message_filter (GdkWin32Display *display,
         default:
           break;
         }
-
+      break;
     default:
       break;
     }