From: Eli Zaretskii Date: Sat, 9 Sep 2017 19:15:30 +0000 (+0300) Subject: Remove more compilation warnings in MinGW64 build X-Git-Tag: emacs-26.0.90~213 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ad7ba0fbf16edfaf6f59310ccd56088a656964d0;p=emacs.git Remove more compilation warnings in MinGW64 build * src/w32.c (faccessat, map_w32_filename): * src/w32fns.c (w32_wnd_proc): * src/w32term.c (w32_horizontal_scroll_bar_handle_click) (w32_scroll_bar_handle_click): Use FALLTHROUGH to avoid compiler warnings with GCC 7 and later. --- diff --git a/src/w32.c b/src/w32.c index 131361d7dc4..f583d5e76c2 100644 --- a/src/w32.c +++ b/src/w32.c @@ -3379,6 +3379,7 @@ map_w32_filename (const char * name, const char ** pPath) if ( ! left ) str[-1] = c; /* replace last character of part */ /* FALLTHRU */ + FALLTHROUGH; default: if ( left && 'A' <= c && c <= 'Z' ) { @@ -3958,6 +3959,7 @@ faccessat (int dirfd, const char * path, int mode, int flags) goto check_attrs; } /* FALLTHROUGH */ + FALLTHROUGH; case ERROR_FILE_NOT_FOUND: case ERROR_BAD_NETPATH: errno = ENOENT; diff --git a/src/w32fns.c b/src/w32fns.c index 60682ae3a1a..6b93afa8b8d 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -4414,6 +4414,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) goto dflt; } /* Fall through */ + FALLTHROUGH; case WM_SYSCHAR: case WM_CHAR: @@ -4676,6 +4677,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) if (w32_pass_extra_mouse_buttons_to_system) goto dflt; /* else fall through and process them. */ + FALLTHROUGH; case WM_MBUTTONDOWN: case WM_MBUTTONUP: handle_plain_button: @@ -4781,6 +4783,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) track_mouse_event_fn (&tme); track_mouse_window = hwnd; } + FALLTHROUGH; case WM_HSCROLL: case WM_VSCROLL: if (w32_mouse_move_interval <= 0 @@ -4822,6 +4825,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) if (w32_pass_multimedia_buttons_to_system) goto dflt; /* Otherwise, pass to lisp, the same way we do with mousehwheel. */ + FALLTHROUGH; /* FIXME!!! This is never reached so what's the purpose? If the non-zero return remark below is right we're doing it wrong all @@ -5084,6 +5088,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) case WM_MOUSELEAVE: /* No longer tracking mouse. */ track_mouse_window = NULL; + FALLTHROUGH; case WM_ACTIVATEAPP: case WM_ACTIVATE: @@ -5124,6 +5129,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) menu_free_timer = 0; } } + FALLTHROUGH; case WM_MOVE: case WM_SIZE: command: @@ -5162,6 +5168,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) fails (see bug#25875). But if it fails, we want to find out about it, so let's leave 1000 for now. */ sleep (1000); + FALLTHROUGH; case WM_WINDOWPOSCHANGING: /* Don't restrict the sizing of any kind of frames. If the window diff --git a/src/w32term.c b/src/w32term.c index 2785ae2b52d..e62ae7e8426 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -4346,6 +4346,7 @@ w32_scroll_bar_handle_click (struct scroll_bar *bar, W32Msg *msg, SetScrollInfo (SCROLL_BAR_W32_WINDOW (bar), SB_CTL, &si, TRUE); } /* fall through */ + FALLTHROUGH; default: emacs_event->kind = NO_EVENT; return FALSE; @@ -4460,6 +4461,7 @@ w32_horizontal_scroll_bar_handle_click (struct scroll_bar *bar, W32Msg *msg, SetScrollInfo (SCROLL_BAR_W32_WINDOW (bar), SB_CTL, &si, TRUE); } /* fall through */ + FALLTHROUGH; default: emacs_event->kind = NO_EVENT; return FALSE;