From f075db637aaa1c63535bc4dbce5a9552c7d1816e Mon Sep 17 00:00:00 2001 From: Luca Bacci Date: Thu, 12 Oct 2023 10:08:27 +0200 Subject: [PATCH] glib/giowin32.c: Add G_GNUC_FALLTHROUGH annotation Fixes the following warning on CLang: ../glib/glib/giowin32.c:1665:7: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] default: ^ ../glib/glib/giowin32.c:1665:7: note: insert '__attribute__((fallthrough));' to silence this warning default: ^ __attribute__((fallthrough)); ../glib/glib/giowin32.c:1665:7: note: insert 'break;' to avoid fall-through default: ^ break; --- glib/giowin32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glib/giowin32.c b/glib/giowin32.c index f0e025d4a..ecc337aec 100644 --- a/glib/giowin32.c +++ b/glib/giowin32.c @@ -1661,7 +1661,7 @@ g_io_channel_new_file (const gchar *filename, mode_num |= MODE_PLUS; break; } - /* Fall through */ + G_GNUC_FALLTHROUGH; default: g_warning ("Invalid GIOFileMode %s.", mode); return NULL;