[gtk/gtk-4-4] build: fix implicit-fallthrough errors with clang



commit eab7c19dfb104da871de4e426967475007af311c
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Thu Aug 26 05:14:18 2021 +0200

    build: fix implicit-fallthrough errors with clang
    
    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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkimcontextime.c b/gtk/gtkimcontextime.c
index c8378c836e..8f09cde29d 100644
--- a/gtk/gtkimcontextime.c
+++ b/gtk/gtkimcontextime.c
@@ -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;
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]