mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
filterlistmodel: Fix fallthrough annotations in unreachable code
They are only unreachable in debug builds but still break the build on clang.
This commit is contained in:
parent
672413f1f6
commit
1f7adfd9ff
@ -214,11 +214,11 @@ gtk_filter_list_model_get_n_items (GListModel *list)
|
||||
case GTK_FILTER_MATCH_ALL:
|
||||
return g_list_model_get_n_items (self->model);
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
G_GNUC_FALLTHROUGH;
|
||||
case GTK_FILTER_MATCH_SOME:
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
node = gtk_rb_tree_get_root (self->items);
|
||||
@ -245,12 +245,12 @@ gtk_filter_list_model_get_item (GListModel *list,
|
||||
unfiltered = position;
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
G_GNUC_FALLTHROUGH;
|
||||
case GTK_FILTER_MATCH_SOME:
|
||||
gtk_filter_list_model_get_nth_filtered (self->items, position, &unfiltered);
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
return g_list_model_get_item (self->model, unfiltered);
|
||||
@ -325,11 +325,11 @@ gtk_filter_list_model_items_changed_cb (GListModel *model,
|
||||
g_list_model_items_changed (G_LIST_MODEL (self), position, removed, added);
|
||||
return;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
G_GNUC_FALLTHROUGH;
|
||||
case GTK_FILTER_MATCH_SOME:
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
node = gtk_filter_list_model_get_nth (self->items, position, &filter_position);
|
||||
@ -571,7 +571,8 @@ gtk_filter_list_model_update_strictness_and_refilter (GtkFilterListModel *self)
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
G_GNUC_FALLTHROUGH;
|
||||
break;
|
||||
|
||||
case GTK_FILTER_MATCH_SOME:
|
||||
switch (self->strictness)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user