Fix implicit-fallthrough warning

This commit is contained in:
Maarten Bent
2020-12-22 15:42:56 +01:00
parent 062147ff1c
commit 0438ca19c1
12 changed files with 12 additions and 11 deletions

View File

@@ -218,7 +218,7 @@ void wxAuiGtkTabArt::DrawTab(wxDC& dc, wxWindow* wnd, const wxAuiNotebookPage& p
if (!page.active) if (!page.active)
tab_rect.y += 2 * GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_hborder; tab_rect.y += 2 * GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_hborder;
gap_rect_y = tab_rect.y + tab_rect.height - GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_hborder / 2; gap_rect_y = tab_rect.y + tab_rect.height - GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_hborder / 2;
// fall through wxFALLTHROUGH;
case wxAUI_NB_BOTTOM: case wxAUI_NB_BOTTOM:
gap_start = tab_rect.x - GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_vborder / 2; gap_start = tab_rect.x - GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_vborder / 2;
gap_width = tab_rect.width; gap_width = tab_rect.width;

View File

@@ -148,8 +148,8 @@ wxChar wxTextInputStream::GetChar()
// remember the second one for the next call, as there is no // remember the second one for the next call, as there is no
// way to fit both of them into a single wxChar in this case. // way to fit both of them into a single wxChar in this case.
m_lastWChar = wbuf[1]; m_lastWChar = wbuf[1];
#endif // SIZEOF_WCHAR_T == 2
wxFALLTHROUGH; wxFALLTHROUGH;
#endif // SIZEOF_WCHAR_T == 2
case 1: case 1:
m_validBegin = inlen + 1; m_validBegin = inlen + 1;

View File

@@ -288,7 +288,7 @@ private:
case wxTE_HT_BELOW: case wxTE_HT_BELOW:
// This shouldn't happen for single line control. // This shouldn't happen for single line control.
wxFAIL_MSG( "Unreachable" ); wxFAIL_MSG( "Unreachable" );
// fall through wxFALLTHROUGH;
case wxTE_HT_BEYOND: case wxTE_HT_BEYOND:
// Select the last field. // Select the last field.

View File

@@ -393,7 +393,7 @@ void wxAnyButton::DoSetBitmapPosition(wxDirection dir)
{ {
default: default:
wxFAIL_MSG( "invalid position" ); wxFAIL_MSG( "invalid position" );
// fall through wxFALLTHROUGH;
case wxLEFT: case wxLEFT:
gtkpos = GTK_POS_LEFT; gtkpos = GTK_POS_LEFT;

View File

@@ -301,7 +301,7 @@ static void wxgtk_main_do_event(GdkEvent* event, void* data)
// examine the event itself to distinguish between the two cases but // examine the event itself to distinguish between the two cases but
// this would be unnecessarily complicated). // this would be unnecessarily complicated).
cat2 = wxEVT_CATEGORY_CLIPBOARD; cat2 = wxEVT_CATEGORY_CLIPBOARD;
// Fall through. wxFALLTHROUGH;
case GDK_PROXIMITY_IN: case GDK_PROXIMITY_IN:
case GDK_PROXIMITY_OUT: case GDK_PROXIMITY_OUT:

View File

@@ -901,7 +901,7 @@ void wxMenu::GtkAppend(wxMenuItem* mitem, int pos)
break; break;
default: default:
wxFAIL_MSG("unexpected menu item kind"); wxFAIL_MSG("unexpected menu item kind");
// fall through wxFALLTHROUGH;
case wxITEM_NORMAL: case wxITEM_NORMAL:
#ifdef __WXGTK4__ #ifdef __WXGTK4__
//TODO GtkImageMenuItem is gone, have to implement it ourselves with //TODO GtkImageMenuItem is gone, have to implement it ourselves with

View File

@@ -279,7 +279,7 @@ int wxMessageDialog::ShowModal()
{ {
default: default:
wxFAIL_MSG(wxT("unexpected GtkMessageDialog return code")); wxFAIL_MSG(wxT("unexpected GtkMessageDialog return code"));
// fall through wxFALLTHROUGH;
case GTK_RESPONSE_CANCEL: case GTK_RESPONSE_CANCEL:
case GTK_RESPONSE_DELETE_EVENT: case GTK_RESPONSE_DELETE_EVENT:

View File

@@ -189,7 +189,7 @@ GtkPolicyType GtkPolicyFromWX(wxScrollbarVisibility visibility)
default: default:
wxFAIL_MSG( wxS("unknown scrollbar visibility") ); wxFAIL_MSG( wxS("unknown scrollbar visibility") );
// fall through wxFALLTHROUGH;
case wxSHOW_SB_ALWAYS: case wxSHOW_SB_ALWAYS:
policy = GTK_POLICY_ALWAYS; policy = GTK_POLICY_ALWAYS;

View File

@@ -572,7 +572,7 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase)
break; break;
default: default:
wxFAIL_MSG("unknown toolbar child type"); wxFAIL_MSG("unknown toolbar child type");
// fall through wxFALLTHROUGH;
case wxITEM_DROPDOWN: case wxITEM_DROPDOWN:
case wxITEM_NORMAL: case wxITEM_NORMAL:
tool->m_item = gtk_tool_button_new(NULL, ""); tool->m_item = gtk_tool_button_new(NULL, "");

View File

@@ -5181,7 +5181,7 @@ void wxWindowGTK::GTKSendPaintEvents(const GdkRegion* region)
break; break;
} }
} }
// fall through wxFALLTHROUGH;
case wxBG_STYLE_SYSTEM: case wxBG_STYLE_SYSTEM:
if ( GetThemeEnabled() ) if ( GetThemeEnabled() )

View File

@@ -472,6 +472,7 @@ wxFont::wxFont(wxOSXSystemFont font)
break; break;
case wxOSX_SYSTEM_FONT_FIXED: case wxOSX_SYSTEM_FONT_FIXED:
uifont = kCTFontUIFontUserFixedPitch; uifont = kCTFontUIFontUserFixedPitch;
break;
default: default:
break; break;
} }

View File

@@ -229,7 +229,7 @@ void wxNativeFontInfo::SetStyle(wxFontStyle style)
break; break;
default: default:
wxFAIL_MSG( "unknown font style" ); wxFAIL_MSG( "unknown font style" );
// fall through wxFALLTHROUGH;
case wxFONTSTYLE_NORMAL: case wxFONTSTYLE_NORMAL:
pango_font_description_set_style( description, PANGO_STYLE_NORMAL ); pango_font_description_set_style( description, PANGO_STYLE_NORMAL );
break; break;