From a7f8e990dbaf7d41186b523ad842a60a46322d8e Mon Sep 17 00:00:00 2001 From: Jeremy Sowden Date: Fri, 12 Jul 2019 23:28:10 +0100 Subject: [PATCH] Added explicit fall-through comments to pacify GCC. --- src/defaults.c | 2 ++ src/menu.c | 2 ++ src/placement.c | 3 +++ 3 files changed, 7 insertions(+) diff --git a/src/defaults.c b/src/defaults.c index e20cc46b..31efa3f0 100644 --- a/src/defaults.c +++ b/src/defaults.c @@ -3378,6 +3378,8 @@ static int setSwPOptions(WScreen * scr, WDefaultEntry * entry, void *tdata, void } } + /* Fall through. */ + case 1: if (!WMIsPLString(WMGetFromPLArray(array, 0))) { wwarning(_("Invalid arguments for option \"%s\""), entry->key); diff --git a/src/menu.c b/src/menu.c index cc4d7379..130fe136 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1591,6 +1591,7 @@ void wMenuScroll(WMenu *menu) switch (ev.type) { case EnterNotify: WMHandleEvent(&ev); + /* Fall through. */ case MotionNotify: x = (ev.type == MotionNotify) ? ev.xmotion.x_root : ev.xcrossing.x_root; y = (ev.type == MotionNotify) ? ev.xmotion.y_root : ev.xcrossing.y_root; @@ -1644,6 +1645,7 @@ void wMenuScroll(WMenu *menu) break; case KeyPress: done = 1; + /* Fall through. */ default: WMHandleEvent(&ev); break; diff --git a/src/placement.c b/src/placement.c index 14fe226f..29ee6959 100644 --- a/src/placement.c +++ b/src/placement.c @@ -527,6 +527,7 @@ void PlaceWindow(WWindow *wwin, int *x_ret, int *y_ret, unsigned width, unsigned case WPM_CENTER: if (center_place_window(wwin, x_ret, y_ret, width, height, usableArea)) break; + /* Fall through. */ case WPM_AUTO: if (autoPlaceWindow(wwin, x_ret, y_ret, width, height, False, usableArea)) { @@ -538,6 +539,8 @@ void PlaceWindow(WWindow *wwin, int *x_ret, int *y_ret, unsigned width, unsigned through to cascade placement, as people who want tiling want automagicness aren't going to want to place their window */ + /* Fall through. */ + case WPM_CASCADE: if (wPreferences.window_placement == WPM_AUTO || wPreferences.window_placement == WPM_CENTER) scr->cascade_index++;