diff options
| author | Eli Zaretskii | 2017-09-09 22:15:30 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2017-09-09 22:15:30 +0300 |
| commit | ad7ba0fbf16edfaf6f59310ccd56088a656964d0 (patch) | |
| tree | a3b42309cf89fd8f6ddaeaba43bfdfe1ed80d887 /src | |
| parent | d63123542ffd60dbec0c9038144329b99f0f1d65 (diff) | |
| download | emacs-ad7ba0fbf16edfaf6f59310ccd56088a656964d0.tar.gz emacs-ad7ba0fbf16edfaf6f59310ccd56088a656964d0.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32.c | 2 | ||||
| -rw-r--r-- | src/w32fns.c | 7 | ||||
| -rw-r--r-- | src/w32term.c | 2 |
3 files changed, 11 insertions, 0 deletions
| @@ -3379,6 +3379,7 @@ map_w32_filename (const char * name, const char ** pPath) | |||
| 3379 | if ( ! left ) | 3379 | if ( ! left ) |
| 3380 | str[-1] = c; /* replace last character of part */ | 3380 | str[-1] = c; /* replace last character of part */ |
| 3381 | /* FALLTHRU */ | 3381 | /* FALLTHRU */ |
| 3382 | FALLTHROUGH; | ||
| 3382 | default: | 3383 | default: |
| 3383 | if ( left && 'A' <= c && c <= 'Z' ) | 3384 | if ( left && 'A' <= c && c <= 'Z' ) |
| 3384 | { | 3385 | { |
| @@ -3958,6 +3959,7 @@ faccessat (int dirfd, const char * path, int mode, int flags) | |||
| 3958 | goto check_attrs; | 3959 | goto check_attrs; |
| 3959 | } | 3960 | } |
| 3960 | /* FALLTHROUGH */ | 3961 | /* FALLTHROUGH */ |
| 3962 | FALLTHROUGH; | ||
| 3961 | case ERROR_FILE_NOT_FOUND: | 3963 | case ERROR_FILE_NOT_FOUND: |
| 3962 | case ERROR_BAD_NETPATH: | 3964 | case ERROR_BAD_NETPATH: |
| 3963 | errno = ENOENT; | 3965 | 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) | |||
| 4414 | goto dflt; | 4414 | goto dflt; |
| 4415 | } | 4415 | } |
| 4416 | /* Fall through */ | 4416 | /* Fall through */ |
| 4417 | FALLTHROUGH; | ||
| 4417 | 4418 | ||
| 4418 | case WM_SYSCHAR: | 4419 | case WM_SYSCHAR: |
| 4419 | case WM_CHAR: | 4420 | case WM_CHAR: |
| @@ -4676,6 +4677,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) | |||
| 4676 | if (w32_pass_extra_mouse_buttons_to_system) | 4677 | if (w32_pass_extra_mouse_buttons_to_system) |
| 4677 | goto dflt; | 4678 | goto dflt; |
| 4678 | /* else fall through and process them. */ | 4679 | /* else fall through and process them. */ |
| 4680 | FALLTHROUGH; | ||
| 4679 | case WM_MBUTTONDOWN: | 4681 | case WM_MBUTTONDOWN: |
| 4680 | case WM_MBUTTONUP: | 4682 | case WM_MBUTTONUP: |
| 4681 | handle_plain_button: | 4683 | handle_plain_button: |
| @@ -4781,6 +4783,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) | |||
| 4781 | track_mouse_event_fn (&tme); | 4783 | track_mouse_event_fn (&tme); |
| 4782 | track_mouse_window = hwnd; | 4784 | track_mouse_window = hwnd; |
| 4783 | } | 4785 | } |
| 4786 | FALLTHROUGH; | ||
| 4784 | case WM_HSCROLL: | 4787 | case WM_HSCROLL: |
| 4785 | case WM_VSCROLL: | 4788 | case WM_VSCROLL: |
| 4786 | if (w32_mouse_move_interval <= 0 | 4789 | if (w32_mouse_move_interval <= 0 |
| @@ -4822,6 +4825,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) | |||
| 4822 | if (w32_pass_multimedia_buttons_to_system) | 4825 | if (w32_pass_multimedia_buttons_to_system) |
| 4823 | goto dflt; | 4826 | goto dflt; |
| 4824 | /* Otherwise, pass to lisp, the same way we do with mousehwheel. */ | 4827 | /* Otherwise, pass to lisp, the same way we do with mousehwheel. */ |
| 4828 | FALLTHROUGH; | ||
| 4825 | 4829 | ||
| 4826 | /* FIXME!!! This is never reached so what's the purpose? If the | 4830 | /* FIXME!!! This is never reached so what's the purpose? If the |
| 4827 | non-zero return remark below is right we're doing it wrong all | 4831 | 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) | |||
| 5084 | case WM_MOUSELEAVE: | 5088 | case WM_MOUSELEAVE: |
| 5085 | /* No longer tracking mouse. */ | 5089 | /* No longer tracking mouse. */ |
| 5086 | track_mouse_window = NULL; | 5090 | track_mouse_window = NULL; |
| 5091 | FALLTHROUGH; | ||
| 5087 | 5092 | ||
| 5088 | case WM_ACTIVATEAPP: | 5093 | case WM_ACTIVATEAPP: |
| 5089 | case WM_ACTIVATE: | 5094 | case WM_ACTIVATE: |
| @@ -5124,6 +5129,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) | |||
| 5124 | menu_free_timer = 0; | 5129 | menu_free_timer = 0; |
| 5125 | } | 5130 | } |
| 5126 | } | 5131 | } |
| 5132 | FALLTHROUGH; | ||
| 5127 | case WM_MOVE: | 5133 | case WM_MOVE: |
| 5128 | case WM_SIZE: | 5134 | case WM_SIZE: |
| 5129 | command: | 5135 | command: |
| @@ -5162,6 +5168,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) | |||
| 5162 | fails (see bug#25875). But if it fails, we want to find out | 5168 | fails (see bug#25875). But if it fails, we want to find out |
| 5163 | about it, so let's leave 1000 for now. */ | 5169 | about it, so let's leave 1000 for now. */ |
| 5164 | sleep (1000); | 5170 | sleep (1000); |
| 5171 | FALLTHROUGH; | ||
| 5165 | 5172 | ||
| 5166 | case WM_WINDOWPOSCHANGING: | 5173 | case WM_WINDOWPOSCHANGING: |
| 5167 | /* Don't restrict the sizing of any kind of frames. If the window | 5174 | /* 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, | |||
| 4346 | SetScrollInfo (SCROLL_BAR_W32_WINDOW (bar), SB_CTL, &si, TRUE); | 4346 | SetScrollInfo (SCROLL_BAR_W32_WINDOW (bar), SB_CTL, &si, TRUE); |
| 4347 | } | 4347 | } |
| 4348 | /* fall through */ | 4348 | /* fall through */ |
| 4349 | FALLTHROUGH; | ||
| 4349 | default: | 4350 | default: |
| 4350 | emacs_event->kind = NO_EVENT; | 4351 | emacs_event->kind = NO_EVENT; |
| 4351 | return FALSE; | 4352 | return FALSE; |
| @@ -4460,6 +4461,7 @@ w32_horizontal_scroll_bar_handle_click (struct scroll_bar *bar, W32Msg *msg, | |||
| 4460 | SetScrollInfo (SCROLL_BAR_W32_WINDOW (bar), SB_CTL, &si, TRUE); | 4461 | SetScrollInfo (SCROLL_BAR_W32_WINDOW (bar), SB_CTL, &si, TRUE); |
| 4461 | } | 4462 | } |
| 4462 | /* fall through */ | 4463 | /* fall through */ |
| 4464 | FALLTHROUGH; | ||
| 4463 | default: | 4465 | default: |
| 4464 | emacs_event->kind = NO_EVENT; | 4466 | emacs_event->kind = NO_EVENT; |
| 4465 | return FALSE; | 4467 | return FALSE; |