diff --git a/samples/listctrl/listtest.cpp b/samples/listctrl/listtest.cpp index de6056068e..6eb4eb4544 100644 --- a/samples/listctrl/listtest.cpp +++ b/samples/listctrl/listtest.cpp @@ -1344,8 +1344,9 @@ void MyListCtrl::OnListKeyDown(wxListEvent& event) { InsertItemInReportView(event.GetIndex()); } + break; } - //else: fall through + wxFALLTHROUGH; default: LogEvent(event, wxT("OnListKeyDown")); diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 1ba46abea9..b143a705e7 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -3932,6 +3932,7 @@ void wxDataViewMainWindow::OnChar( wxKeyEvent &event ) break; } // else: fall through to WXK_F2 handling + wxFALLTHROUGH; } case WXK_F2: diff --git a/src/generic/vlbox.cpp b/src/generic/vlbox.cpp index 60c524dbd2..9efeccdaf7 100644 --- a/src/generic/vlbox.cpp +++ b/src/generic/vlbox.cpp @@ -664,6 +664,7 @@ void wxVListBox::OnKeyDown(wxKeyEvent& event) // events for the tabs on MSW HandleAsNavigationKey(event); // fall through to default + wxFALLTHROUGH; #endif default: event.Skip(); diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index 9e88873b5e..8361c354c8 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -329,6 +329,7 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD id) // fall through: for compatibility with wxGTK, also send the text // update event when the selection changes (this also seems more // logical as the text does change) + wxFALLTHROUGH; case CBN_EDITCHANGE: if ( m_allowTextEvents ) diff --git a/src/msw/fontutil.cpp b/src/msw/fontutil.cpp index faae55ff18..3a6489b392 100644 --- a/src/msw/fontutil.cpp +++ b/src/msw/fontutil.cpp @@ -182,6 +182,7 @@ wxFontEncoding wxGetFontEncFromCharSet(int cs) default: wxFAIL_MSG( wxT("unexpected Win32 charset") ); // fall through and assume the system charset + wxFALLTHROUGH; case DEFAULT_CHARSET: fontEncoding = wxFONTENCODING_SYSTEM; diff --git a/src/msw/spinctrl.cpp b/src/msw/spinctrl.cpp index 1b47c3e428..b51c10a605 100644 --- a/src/msw/spinctrl.cpp +++ b/src/msw/spinctrl.cpp @@ -95,6 +95,7 @@ wxBuddyTextWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) if ( (WXHWND)wParam == spin->GetHWND() ) break; //else: fall through + wxFALLTHROUGH; case WM_KILLFOCUS: case WM_CHAR: diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index db3f171292..1082912d9b 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -460,6 +460,7 @@ public: if ( image != -1 ) break; //else: fall through + wxFALLTHROUGH; case wxTreeItemIcon_Selected: case wxTreeItemIcon_Expanded: diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index 29a3968e94..90708c2b04 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -1090,6 +1090,7 @@ wxString wxGetOsDescription() break; } //else: must be XP, fall through + wxFALLTHROUGH; case 1: str = "Windows XP"; diff --git a/src/msw/utilsexc.cpp b/src/msw/utilsexc.cpp index 6eef84bbd1..60841d8edd 100644 --- a/src/msw/utilsexc.cpp +++ b/src/msw/utilsexc.cpp @@ -988,10 +988,11 @@ long wxExecute(const wxString& cmd, int flags, wxProcess *handler, { default: wxFAIL_MSG( wxT("unexpected WaitForInputIdle() return code") ); - // fall through + wxFALLTHROUGH; case WAIT_FAILED: wxLogLastError(wxT("WaitForInputIdle() in wxExecute")); + wxFALLTHROUGH; case WAIT_TIMEOUT: wxLogDebug(wxT("Timeout too small in WaitForInputIdle")); diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 68f0fedcc4..dedfc8a303 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -5075,8 +5075,10 @@ bool wxWindowMSW::HandleSize(int WXUNUSED(w), int WXUNUSED(h), WXUINT wParam) default: wxFAIL_MSG( wxT("unexpected WM_SIZE parameter") ); // fall through nevertheless + wxFALLTHROUGH; case SIZE_MAXHIDE: + wxFALLTHROUGH; case SIZE_MAXSHOW: // we're not interested in these messages at all break; @@ -5088,6 +5090,7 @@ bool wxWindowMSW::HandleSize(int WXUNUSED(w), int WXUNUSED(h), WXUINT wParam) case SIZE_MAXIMIZED: /* processed = */ HandleMaximize(); // fall through to send a normal size event as well + wxFALLTHROUGH; case SIZE_RESTORED: // don't use w and h parameters as they specify the client size @@ -5097,6 +5100,7 @@ bool wxWindowMSW::HandleSize(int WXUNUSED(w), int WXUNUSED(h), WXUINT wParam) event.SetEventObject(this); processed = HandleWindowEvent(event); + break; } return processed; @@ -6195,60 +6199,70 @@ WXWORD WXToVK(int wxk, bool *isExtended) { case WXK_PAGEUP: extended = true; + wxFALLTHROUGH; case WXK_NUMPAD_PAGEUP: vk = VK_PRIOR; break; case WXK_PAGEDOWN: extended = true; + wxFALLTHROUGH; case WXK_NUMPAD_PAGEDOWN: vk = VK_NEXT; break; case WXK_END: extended = true; + wxFALLTHROUGH; case WXK_NUMPAD_END: vk = VK_END; break; case WXK_HOME: extended = true; + wxFALLTHROUGH; case WXK_NUMPAD_HOME: vk = VK_HOME; break; case WXK_LEFT: extended = true; + wxFALLTHROUGH; case WXK_NUMPAD_LEFT: vk = VK_LEFT; break; case WXK_UP: extended = true; + wxFALLTHROUGH; case WXK_NUMPAD_UP: vk = VK_UP; break; case WXK_RIGHT: extended = true; + wxFALLTHROUGH; case WXK_NUMPAD_RIGHT: vk = VK_RIGHT; break; case WXK_DOWN: extended = true; + wxFALLTHROUGH; case WXK_NUMPAD_DOWN: vk = VK_DOWN; break; case WXK_INSERT: extended = true; + wxFALLTHROUGH; case WXK_NUMPAD_INSERT: vk = VK_INSERT; break; case WXK_DELETE: extended = true; + wxFALLTHROUGH; case WXK_NUMPAD_DELETE: vk = VK_DELETE; break; @@ -6264,6 +6278,7 @@ WXWORD WXToVK(int wxk, bool *isExtended) { vk = (WXWORD)wxk; } + break; } if ( isExtended ) diff --git a/src/ribbon/art_msw.cpp b/src/ribbon/art_msw.cpp index 87e651650f..2baddeef67 100644 --- a/src/ribbon/art_msw.cpp +++ b/src/ribbon/art_msw.cpp @@ -1628,6 +1628,7 @@ void wxRibbonMSWArtProvider::DrawScrollButton( { case wxRIBBON_SCROLL_BTN_LEFT: rect.x++; + wxFALLTHROUGH; case wxRIBBON_SCROLL_BTN_RIGHT: rect.y--; rect.width--;