Merge branch 'wip/baedert/for-master' into 'main'

build: Make GCC ignore fallthrough comments

Closes #4663

See merge request GNOME/gtk!4419
This commit is contained in:
Matthias Clasen 2022-01-27 16:27:12 +00:00
commit a37584a404
2 changed files with 3 additions and 2 deletions

View File

@ -200,7 +200,7 @@ gtk_gesture_single_handle_event (GtkEventController *controller,
case GDK_TOUCHPAD_HOLD:
if (gdk_touchpad_event_get_n_fingers (event) == 1)
return FALSE;
/* fallthrough */
G_GNUC_FALLTHROUGH;
case GDK_TOUCH_CANCEL:
case GDK_GRAB_BROKEN:
case GDK_TOUCHPAD_SWIPE:

View File

@ -298,7 +298,8 @@ elif cc.get_id() == 'gcc' or cc.get_id() == 'clang'
'array-bounds',
'empty-body',
'implicit',
'implicit-fallthrough',
'implicit-fallthrough', # For non-gcc
'implicit-fallthrough=5', # For GCC, only recognize the attribute and no comments
'init-self',
'int-to-pointer-cast',
'main',