[9ae8f17cfc8ba7fd8fb34b2a194ef965a3b36a40839a46eeab1350e916692ac9/wip/baedert/for-master: 3/3] filterlistmodel: Replace fallthrough annotation with comment
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [9ae8f17cfc8ba7fd8fb34b2a194ef965a3b36a40839a46eeab1350e916692ac9/wip/baedert/for-master: 3/3] filterlistmodel: Replace fallthrough annotation with comment
- Date: Wed, 8 Jul 2020 04:17:40 +0000 (UTC)
commit efd20ff385a2300f1713a8b56049adb94d7518b1
Author: Timm Bäder <mail baedert org>
Date: Wed Jul 8 06:15:34 2020 +0200
filterlistmodel: Replace fallthrough annotation with comment
1) Clang understands the annotation but errors out when it's beign used
in unreachable code.
2) g_assert_not_reached() usually causes an abort() but not if
G_DISABLE_ASSERT is set
We can technically just remove the annotation and not replace it, but
let's use a comment instead.
gtk/gtkfilterlistmodel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkfilterlistmodel.c b/gtk/gtkfilterlistmodel.c
index 75690c4b5f..b24cfaf9f1 100644
--- a/gtk/gtkfilterlistmodel.c
+++ b/gtk/gtkfilterlistmodel.c
@@ -494,7 +494,7 @@ gtk_filter_list_model_refilter (GtkFilterListModel *self,
{
default:
g_assert_not_reached ();
- G_GNUC_FALLTHROUGH;
+ /* fall through */
case GTK_FILTER_CHANGE_DIFFERENT:
self->matches = gtk_bitset_new_empty ();
pending = gtk_bitset_new_range (0, g_list_model_get_n_items (self->model));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]