In preparation of raising -Wimplicit-fallthrough to 5, replace all fall-through comments with the fallthrough attribute pseudo-keyword.
Signed-off-by: Emmanouil Pitsidianakis <manos.pitsidiana...@linaro.org> --- ui/sdl2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/sdl2.c b/ui/sdl2.c index fbfdb64e90..3d157a14aa 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -576,78 +576,78 @@ static void handle_mousewheel(SDL_Event *ev) static void handle_windowevent(SDL_Event *ev) { struct sdl2_console *scon = get_scon_from_window(ev->window.windowID); bool allow_close = true; if (!scon) { return; } switch (ev->window.event) { case SDL_WINDOWEVENT_RESIZED: { QemuUIInfo info; memset(&info, 0, sizeof(info)); info.width = ev->window.data1; info.height = ev->window.data2; dpy_set_ui_info(scon->dcl.con, &info, true); } sdl2_redraw(scon); break; case SDL_WINDOWEVENT_EXPOSED: sdl2_redraw(scon); break; case SDL_WINDOWEVENT_FOCUS_GAINED: win32_kbd_set_grab(gui_grab); if (qemu_console_is_graphic(scon->dcl.con)) { win32_kbd_set_window(sdl2_win32_get_hwnd(scon)); } - /* fall through */ + fallthrough; case SDL_WINDOWEVENT_ENTER: if (!gui_grab && (qemu_input_is_absolute(scon->dcl.con) || absolute_enabled)) { absolute_mouse_grab(scon); } /* If a new console window opened using a hotkey receives the * focus, SDL sends another KEYDOWN event to the new window, * closing the console window immediately after. * * Work around this by ignoring further hotkey events until a * key is released. */ scon->ignore_hotkeys = get_mod_state(); break; case SDL_WINDOWEVENT_FOCUS_LOST: if (qemu_console_is_graphic(scon->dcl.con)) { win32_kbd_set_window(NULL); } if (gui_grab && !gui_fullscreen) { sdl_grab_end(scon); } break; case SDL_WINDOWEVENT_RESTORED: update_displaychangelistener(&scon->dcl, GUI_REFRESH_INTERVAL_DEFAULT); break; case SDL_WINDOWEVENT_MINIMIZED: update_displaychangelistener(&scon->dcl, 500); break; case SDL_WINDOWEVENT_CLOSE: if (qemu_console_is_graphic(scon->dcl.con)) { if (scon->opts->has_window_close && !scon->opts->window_close) { allow_close = false; } if (allow_close) { shutdown_action = SHUTDOWN_ACTION_POWEROFF; qemu_system_shutdown_request(SHUTDOWN_CAUSE_HOST_UI); } } else { SDL_HideWindow(scon->real_window); scon->hidden = true; } break; case SDL_WINDOWEVENT_SHOWN: scon->hidden = false; break; case SDL_WINDOWEVENT_HIDDEN: scon->hidden = true; break; } } -- 2.39.2