adding wxFALLTHROUGH where until now we had comments, allows for code-analysis support

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76399 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2014-04-26 17:36:32 +00:00
parent 6c6362401c
commit f18d7097da
55 changed files with 103 additions and 100 deletions

View File

@ -784,7 +784,7 @@ static wxOrientation GetOrientation(long style)
return wxVERTICAL;
default:
wxFAIL_MSG("toolbar cannot be locked in both horizontal and vertical orientations (maybe no lock was intended?)");
// fall through
wxFALLTHROUGH;
case 0:
return wxBOTH;
}

View File

@ -265,7 +265,7 @@ wxTangoArtProvider::CreateBitmap(const wxArtID& id,
{
default:
wxFAIL_MSG( "Unsupported Tango bitmap size" );
// fall through
wxFALLTHROUGH;
case TangoSize_16:
data = entry.data16;

View File

@ -127,7 +127,7 @@ wxBase64Decode(void *dst_, size_t dstLen,
case WSP:
if ( mode == wxBase64DecodeMode_SkipWS )
continue;
// fall through
wxFALLTHROUGH;
case INV:
if ( mode == wxBase64DecodeMode_Relaxed )

View File

@ -166,11 +166,11 @@ wxRect wxBookCtrlBase::GetPageRect() const
{
default:
wxFAIL_MSG( wxT("unexpected alignment") );
// fall through
wxFALLTHROUGH;
case wxBK_TOP:
rectPage.y = size.y + GetInternalBorder();
// fall through
wxFALLTHROUGH;
case wxBK_BOTTOM:
rectPage.height -= size.y + GetInternalBorder();
@ -180,7 +180,7 @@ wxRect wxBookCtrlBase::GetPageRect() const
case wxBK_LEFT:
rectPage.x = size.x + GetInternalBorder();
// fall through
wxFALLTHROUGH;
case wxBK_RIGHT:
rectPage.width -= size.x + GetInternalBorder();
@ -225,7 +225,7 @@ void wxBookCtrlBase::DoSize()
{
default:
wxFAIL_MSG( wxT("unexpected alignment") );
// fall through
wxFALLTHROUGH;
case wxBK_TOP:
case wxBK_LEFT:

View File

@ -626,7 +626,7 @@ void wxCmdLineParser::SetDesc(const wxCmdLineEntryDesc *desc)
default:
wxFAIL_MSG( wxT("unknown command line entry type") );
// still fall through
wxFALLTHROUGH;
case wxCMD_LINE_NONE:
return;
@ -1089,7 +1089,7 @@ int wxCmdLineParser::Parse(bool showUsage)
{
default:
wxFAIL_MSG( wxT("unknown option type") );
// still fall through
wxFALLTHROUGH;
case wxCMD_LINE_VAL_STRING:
opt.SetStrVal(value);
@ -1470,7 +1470,7 @@ static wxString GetTypeName(wxCmdLineParamType type)
{
default:
wxFAIL_MSG( wxT("unknown option type") );
// still fall through
wxFALLTHROUGH;
case wxCMD_LINE_VAL_STRING:
s = _("str");

View File

@ -494,7 +494,7 @@ wxString wxExpandEnvVars(const wxString& str)
break;
}
//else: fall through
wxFALLTHROUGH;
default:
strResult += str[n];

View File

@ -255,7 +255,7 @@ void wxItemContainer::AssignNewItemClientData(unsigned int pos,
default:
wxFAIL_MSG( wxT("unknown client data type") );
// fall through
wxFALLTHROUGH;
case wxClientData_None:
// nothing to do

View File

@ -712,7 +712,7 @@ wxString wxDateTime::Format(const wxString& formatp, const TimeZone& tz) const
// no, it wasn't the width
wxFAIL_MSG(wxT("unknown format specifier"));
// fall through and just copy it nevertheless
wxFALLTHROUGH;
case wxT('%'): // a percent sign
res += *p;
@ -1495,7 +1495,7 @@ wxDateTime::ParseFormat(const wxString& date,
case 0: // the end of string
wxFAIL_MSG(wxT("unexpected format end"));
// fall through
wxFALLTHROUGH;
default: // not a known format spec
return false;
@ -2262,7 +2262,7 @@ wxString wxTimeSpan::Format(const wxString& format) const
{
default:
wxFAIL_MSG( wxT("invalid format character") );
// fall through
wxFALLTHROUGH;
case wxT('%'):
str += ch;

View File

@ -126,7 +126,7 @@ size_t wxDir::Traverse(wxDirTraverser& sink,
{
default:
wxFAIL_MSG(wxT("unexpected OnDir() return value") );
// fall through
wxFALLTHROUGH;
case wxDIR_STOP:
cont = false;
@ -154,11 +154,11 @@ size_t wxDir::Traverse(wxDirTraverser& sink,
{
default:
wxFAIL_MSG(wxT("unexpected OnOpenError() return value") );
// fall through
wxFALLTHROUGH;
case wxDIR_STOP:
cont = false;
// fall through
wxFALLTHROUGH;
case wxDIR_IGNORE:
tryagain = false;

View File

@ -442,7 +442,7 @@ bool wxDialogBase::SendCloseButtonClickEvent()
if ( EmulateButtonClickIfPresent(wxID_CANCEL) )
return true;
idCancel = GetAffirmativeId();
// fall through
wxFALLTHROUGH;
default:
// translate Esc to button press for the button with given id

View File

@ -601,7 +601,7 @@ bool wxMouseEvent::ButtonDClick(int but) const
{
default:
wxFAIL_MSG(wxT("invalid parameter in wxMouseEvent::ButtonDClick"));
// fall through
wxFALLTHROUGH;
case wxMOUSE_BTN_ANY:
return (LeftDClick() || MiddleDClick() || RightDClick() ||
@ -631,7 +631,7 @@ bool wxMouseEvent::ButtonDown(int but) const
{
default:
wxFAIL_MSG(wxT("invalid parameter in wxMouseEvent::ButtonDown"));
// fall through
wxFALLTHROUGH;
case wxMOUSE_BTN_ANY:
return (LeftDown() || MiddleDown() || RightDown() ||
@ -661,7 +661,7 @@ bool wxMouseEvent::ButtonUp(int but) const
{
default:
wxFAIL_MSG(wxT("invalid parameter in wxMouseEvent::ButtonUp"));
// fall through
wxFALLTHROUGH;
case wxMOUSE_BTN_ANY:
return (LeftUp() || MiddleUp() || RightUp() ||
@ -691,7 +691,7 @@ bool wxMouseEvent::Button(int but) const
{
default:
wxFAIL_MSG(wxT("invalid parameter in wxMouseEvent::Button"));
// fall through
wxFALLTHROUGH;
case wxMOUSE_BTN_ANY:
return ButtonUp(wxMOUSE_BTN_ANY) ||

View File

@ -195,7 +195,7 @@ bool wxFFile::Seek(wxFileOffset ofs, wxSeekMode mode)
{
default:
wxFAIL_MSG(wxT("unknown seek mode"));
// still fall through
wxFALLTHROUGH;
case wxFromStart:
origin = SEEK_SET;

View File

@ -147,7 +147,7 @@ bool wxFile::Access(const wxString& name, OpenMode mode)
{
default:
wxFAIL_MSG(wxT("bad wxFile::Access mode parameter."));
// fall through
wxFALLTHROUGH;
case read:
how = R_OK;
@ -232,6 +232,7 @@ bool wxFile::Open(const wxString& fileName, OpenMode mode, int accessMode)
}
//else: fall through as write_append is the same as write if the
// file doesn't exist
wxFALLTHROUGH;
case write:
flags |= O_WRONLY | O_CREAT | O_TRUNC;
@ -406,7 +407,7 @@ wxFileOffset wxFile::Seek(wxFileOffset ofs, wxSeekMode mode)
switch ( mode ) {
default:
wxFAIL_MSG(wxT("unknown seek origin"));
wxFALLTHROUGH;
case wxFromStart:
origin = SEEK_SET;
break;

View File

@ -2056,7 +2056,7 @@ static wxString FilterOutValue(const wxString& str)
c = wxT('"');
break;
}
//else: fall through
wxFALLTHROUGH;
default:
strResult += str[n];

View File

@ -495,7 +495,7 @@ void wxFileName::SetPath( const wxString& pathOrig, wxPathFormat format )
default:
wxFAIL_MSG( wxT("Unknown path format") );
// !! Fall through !!
wxFALLTHROUGH;
case wxPATH_UNIX:
m_relative = leadingChar != wxT('/');
@ -1890,7 +1890,7 @@ wxString wxFileName::GetForbiddenChars(wxPathFormat format)
{
default :
wxFAIL_MSG( wxT("Unknown path format") );
// !! Fall through !!
wxFALLTHROUGH;
case wxPATH_UNIX:
break;
@ -1945,7 +1945,7 @@ wxString wxFileName::GetPathSeparators(wxPathFormat format)
default:
wxFAIL_MSG( wxT("Unknown wxPATH_XXX style") );
// fall through
wxFALLTHROUGH;
case wxPATH_UNIX:
seps = wxFILE_SEP_PATH_UNIX;
@ -2094,7 +2094,7 @@ wxString wxFileName::GetPath( int flags, wxPathFormat format ) const
default:
wxFAIL_MSG( wxT("Unknown path format") );
// fall through
wxFALLTHROUGH;
case wxPATH_UNIX:
if ( !m_relative )
@ -2143,7 +2143,7 @@ wxString wxFileName::GetPath( int flags, wxPathFormat format ) const
default:
wxFAIL_MSG( wxT("Unexpected path format") );
// still fall through
wxFALLTHROUGH;
case wxPATH_DOS:
case wxPATH_UNIX:

View File

@ -808,7 +808,7 @@ wxString wxNativeFontInfo::ToUserString() const
{
default:
wxFAIL_MSG( wxT("unknown font weight") );
// fall through
wxFALLTHROUGH;
case wxFONTWEIGHT_NORMAL:
break;
@ -826,7 +826,7 @@ wxString wxNativeFontInfo::ToUserString() const
{
default:
wxFAIL_MSG( wxT("unknown font style") );
// fall through
wxFALLTHROUGH;
case wxFONTSTYLE_NORMAL:
break;

View File

@ -388,7 +388,7 @@ bool wxFTP::SetTransferMode(TransferMode transferMode)
{
default:
wxFAIL_MSG(wxT("unknown FTP transfer mode"));
// fall through
wxFALLTHROUGH;
case BINARY:
mode = wxT('I');

View File

@ -204,18 +204,18 @@ bool wxBMPHandler::SaveDib(wxImage *image,
{
default:
wxFAIL_MSG( wxT("unexpected image resolution units") );
// fall through
wxFALLTHROUGH;
case wxIMAGE_RESOLUTION_NONE:
hres =
vres = 72;
// fall through to convert it to correct units
wxFALLTHROUGH;// fall through to convert it to correct units
case wxIMAGE_RESOLUTION_INCHES:
// convert resolution in inches to resolution in centimeters
hres = (int)(10*mm2inches*hres);
vres = (int)(10*mm2inches*vres);
// fall through to convert it to resolution in meters
wxFALLTHROUGH;// fall through to convert it to resolution in meters
case wxIMAGE_RESOLUTION_CM:
// convert resolution in centimeters to resolution in meters

View File

@ -387,12 +387,12 @@ void CopyDataFromPNG(wxImage *image,
// using the mask at all
wxASSERT_MSG( IsOpaque(a), wxT("logic error") );
// fall through
wxFALLTHROUGH;
case Transparency_Alpha:
if ( alpha )
*alpha++ = a;
// fall through
wxFALLTHROUGH;
case Transparency_None:
*ptrDst++ = g;
@ -466,12 +466,12 @@ void CopyDataFromPNG(wxImage *image,
}
}
// fall through
wxFALLTHROUGH;
case Transparency_Alpha:
if ( alpha )
*alpha++ = a;
// fall through
wxFALLTHROUGH;
case Transparency_None:
*ptrDst++ = r;
@ -612,7 +612,7 @@ wxPNGHandler::LoadFile(wxImage *image,
{
default:
wxLogWarning(_("Unknown PNG resolution unit %d"), unitType);
// fall through
wxFALLTHROUGH;
case PNG_RESOLUTION_UNKNOWN:
image->SetOption(wxIMAGE_OPTION_RESOLUTIONX, resX);
@ -1004,7 +1004,7 @@ bool wxPNGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbos
{
default:
wxFAIL_MSG( wxT("unknown wxPNG_TYPE_XXX") );
// fall through
wxFALLTHROUGH;
case wxPNG_TYPE_COLOUR:
*pData++ = clr.red;

View File

@ -531,7 +531,7 @@ bool wxTIFFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos
default:
wxLogWarning(_("Unknown TIFF resolution unit %d ignored"),
tiffRes);
// fall through
wxFALLTHROUGH;
case RESUNIT_NONE:
resUnit = wxIMAGE_RESOLUTION_NONE;
@ -628,7 +628,7 @@ bool wxTIFFHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo
{
default:
wxFAIL_MSG( wxT("unknown image resolution units") );
// fall through
wxFALLTHROUGH;
case wxIMAGE_RESOLUTION_NONE:
tiffRes = RESUNIT_NONE;

View File

@ -386,7 +386,7 @@ bool wxMarkupParser::Parse(const wxString& text)
if ( n < WXSIZEOF(xmlEntities) )
break;
//else: fall through, '&' is not special
wxFALLTHROUGH;//else: fall through, '&' is not special
}
default:

View File

@ -608,7 +608,7 @@ void wxPopupWindowHandler::OnLeftDown(wxMouseEvent& event)
default:
// forgot to update the switch after adding a new hit test code?
wxFAIL_MSG( wxT("unexpected HitTest() return value") );
// fall through
wxFALLTHROUGH;
case wxHT_WINDOW_CORNER:
// don't actually know if this one is good for anything, but let it

View File

@ -169,7 +169,7 @@ bool wxProcess::Exists(int pid)
case wxKILL_ERROR:
case wxKILL_BAD_SIGNAL:
wxFAIL_MSG( wxT("unexpected wxProcess::Kill() return code") );
// fall through
wxFALLTHROUGH;
case wxKILL_NO_PROCESS:
return false;

View File

@ -349,7 +349,7 @@ wxString wxRadioBoxBase::DoGetHelpTextAtPoint(const wxWindow *derived,
default:
wxFAIL_MSG( "unknown help even origin" );
// fall through
wxFALLTHROUGH;
case wxHelpEvent::Origin_Unknown:
// this value is used when we're called from GetHelpText() for the

View File

@ -433,7 +433,7 @@ bool wxRegExImpl::Matches(const wxRegChar *str,
// an error occurred
wxLogError(_("Failed to find match for regular expression: %s"),
GetErrorMsg(rc, !str).c_str());
// fall through
wxFALLTHROUGH;
case REG_NOMATCH:
// no match

View File

@ -2201,7 +2201,7 @@ bool wxString::Matches(const wxString& mask) const
// (however note that we don't quote '[' and ']' to allow
// using them for Unix shell like matching)
pattern += wxT('\\');
// fall through
wxFALLTHROUGH;
default:
pattern += *pszMask;

View File

@ -211,7 +211,7 @@ public:
format++;
break;
}
//else: fall through
wxFALLTHROUGH;
default:
size = Size_Default;

View File

@ -52,7 +52,7 @@ const wxChar *wxTextBuffer::GetEOL(wxTextFileType type)
switch ( type ) {
default:
wxFAIL_MSG(wxT("bad buffer type in wxTextBuffer::GetEOL."));
// fall through nevertheless - we must return something...
wxFALLTHROUGH; // fall through nevertheless - we must return something...
case wxTextFileType_None: return wxEmptyString;
case wxTextFileType_Unix: return wxT("\n");

View File

@ -64,7 +64,7 @@ bool wxTextFile::OnOpen(const wxString &strBufferName, wxTextBufferOpenMode Open
{
default:
wxFAIL_MSG( wxT("unknown open mode in wxTextFile::Open") );
// fall through
wxFALLTHROUGH;
case ReadAccess :
FileOpenMode = wxFile::read;

View File

@ -190,7 +190,7 @@ bool wxStringTokenizer::DoHasMoreTokens() const
case wxTOKEN_INVALID:
case wxTOKEN_DEFAULT:
wxFAIL_MSG( wxT("unexpected tokenizer mode") );
// fall through
wxFALLTHROUGH;
case wxTOKEN_STRTOK:
// never return empty delimiters

View File

@ -359,7 +359,7 @@ void wxTreeCtrlBase::OnCharHook(wxKeyEvent& event)
{
case WXK_ESCAPE:
discardChanges = true;
// fall through
wxFALLTHROUGH;
case WXK_RETURN:
EndEditLabel(GetFocusedItem(), discardChanges);

View File

@ -92,7 +92,7 @@ wxChar wxTextInputStream::NextChar()
// loop iteration we shouldn't be able to decode 2 or more of
// them with an extra single byte, something fishy is going on
wxFAIL_MSG("unexpected decoding result");
// fall through nevertheless and return at least something
wxFALLTHROUGH;// fall through nevertheless and return at least something
case 1:
// we finally decoded a character
@ -457,7 +457,7 @@ void wxTextOutputStream::WriteString(const wxString& string)
default:
wxFAIL_MSG( wxT("unknown EOL mode in wxTextOutputStream") );
// fall through
wxFALLTHROUGH;
case wxEOL_UNIX:
// don't treat '\n' specially

View File

@ -1378,7 +1378,7 @@ void wxGenericCalendarCtrl::OnClick(wxMouseEvent& event)
default:
wxFAIL_MSG(wxT("unknown hittest code"));
// fall through
wxFALLTHROUGH;
case wxCAL_HITTEST_NOWHERE:
event.Skip();

View File

@ -4958,7 +4958,7 @@ void wxGrid::OnKeyDown( wxKeyEvent& event )
MoveCursorRight(false);
break;
}
//else: fall through
wxFALLTHROUGH;
default:
event.Skip();
@ -5173,7 +5173,7 @@ wxGrid::UpdateBlockBeingSelected(int topRow, int leftCol,
{
default:
wxFAIL_MSG( "unknown selection mode" );
// fall through
wxFALLTHROUGH;
case wxGridSelectCells:
// arbitrary blocks selection allowed so just use the cell

View File

@ -379,7 +379,7 @@ void wxGridSelection::SelectBlock( int topRow, int leftCol,
{
default:
wxFAIL_MSG( "unknown selection mode" );
// fall through
wxFALLTHROUGH;
case wxGrid::wxGridSelectCells:
// nothing to do -- in this mode arbitrary blocks can be selected

View File

@ -154,7 +154,7 @@ wxShowEffect wxInfoBarGeneric::GetShowEffect() const
default:
wxFAIL_MSG( "unknown info bar placement" );
// fall through
wxFALLTHROUGH;
case BarPlacement_Unknown:
return wxSHOW_EFFECT_NONE;
@ -176,7 +176,7 @@ wxShowEffect wxInfoBarGeneric::GetHideEffect() const
default:
wxFAIL_MSG( "unknown info bar placement" );
// fall through
wxFALLTHROUGH;
case BarPlacement_Unknown:
return wxSHOW_EFFECT_NONE;

View File

@ -1110,7 +1110,7 @@ void wxListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
{
default:
wxFAIL_MSG( wxT("unknown list item format") );
// fall through
wxFALLTHROUGH;
case wxLIST_FORMAT_LEFT:
xAligned = x;

View File

@ -238,7 +238,7 @@ wxString wxLogGui::GetTitle() const
default:
wxFAIL_MSG( "unexpected icon severity" );
// fall through
wxFALLTHROUGH;
case wxICON_INFORMATION:
titleFormat = _("%s Information");
@ -396,7 +396,7 @@ void wxLogGui::DoLogRecord(wxLogLevel level,
#endif // wxUSE_LOG_DIALOG
m_bErrors = true;
}
// fall through
wxFALLTHROUGH;
case wxLOG_Warning:
if ( !m_bErrors ) {

View File

@ -882,7 +882,7 @@ void wxAnyScrollHelperBase::HandleOnChar(wxKeyEvent& event)
case WXK_LEFT:
newEvent.SetOrientation(wxHORIZONTAL);
// fall through
wxFALLTHROUGH;
case WXK_UP:
newEvent.SetEventType(wxEVT_SCROLLWIN_LINEUP);
@ -890,7 +890,7 @@ void wxAnyScrollHelperBase::HandleOnChar(wxKeyEvent& event)
case WXK_RIGHT:
newEvent.SetOrientation(wxHORIZONTAL);
// fall through
wxFALLTHROUGH;
case WXK_DOWN:
newEvent.SetEventType(wxEVT_SCROLLWIN_LINEDOWN);
@ -1292,7 +1292,7 @@ wxScrollHelper::DoAdjustScrollbar(int orient,
default:
wxFAIL_MSG( wxS("unknown scrollbar visibility") );
// fall through
wxFALLTHROUGH;
case wxSHOW_SB_DEFAULT:
range = scrollUnits;

View File

@ -680,7 +680,7 @@ wxString wxSpinCtrl::DoValueToText(double val)
default:
wxFAIL_MSG( wxS("Unsupported spin control base") );
// Fall through
wxFALLTHROUGH;
case 10:
return wxString::Format("%ld", static_cast<long>(val));

View File

@ -3122,7 +3122,7 @@ void wxGenericTreeCtrl::OnChar( wxKeyEvent &event )
ExpandAllChildren(m_current);
break;
}
//else: fall through to Collapse() it
wxFALLTHROUGH;//else: fall through to Collapse() it
case '-':
case WXK_SUBTRACT:
@ -3236,7 +3236,7 @@ void wxGenericTreeCtrl::OnChar( wxKeyEvent &event )
//else: don't try to expand hidden root item (which can be the
// current one when the tree is empty)
// fall through
wxFALLTHROUGH;
case WXK_DOWN:
{

View File

@ -918,7 +918,7 @@ bool wxHtmlHelpWindow::KeywordSearch(const wxString& keyword,
{
default:
wxFAIL_MSG( wxT("unknown help search mode") );
// fall back
wxFALLTHROUGH;
case wxHELP_SEARCH_ALL:
{

View File

@ -276,7 +276,7 @@ void wxHtmlTagsCache::QueryTag(const wxString::const_iterator& at,
case wxHtmlCacheItem::Type_EndingTag:
wxFAIL_MSG("QueryTag called for ending tag - can't be");
// but if it does happen, fall through, better than crashing
wxFALLTHROUGH;// but if it does happen, fall through, better than crashing
case wxHtmlCacheItem::Type_NoMatchingEndingTag:
// If input HTML is invalid and there's no closing tag for this

View File

@ -57,7 +57,7 @@ static wxString LINKAGEMODE HtmlizeLinebreaks(const wxString& str)
if ( j != end && *j == '\n' )
i = j;
}
// fall through
wxFALLTHROUGH;
case '\n':
out << "<br>";
break;

View File

@ -249,7 +249,7 @@ SetBezelStyleFromBorderFlags(NSButton *v,
default:
wxFAIL_MSG( "Unknown border style" );
// fall through
wxFALLTHROUGH;
case 0:
case wxBORDER_STATIC:

View File

@ -3338,7 +3338,7 @@ void wxDataViewColumn::SetWidth(int width)
case wxCOL_WIDTH_DEFAULT:
width = wxDVC_DEFAULT_WIDTH;
// fall through
wxFALLTHROUGH;
default:
[m_NativeDataPtr->GetNativeColumnPtr() setWidth:width];

View File

@ -173,28 +173,28 @@ void wxMacCocoaMenuItemSetAccelerator( NSMenuItem* menuItem, wxAcceleratorEntry*
case WXK_NUMPAD_LEFT :
modifiers |= NSNumericPadKeyMask;
// pass through
wxFALLTHROUGH;
case WXK_LEFT :
shortcut = NSLeftArrowFunctionKey ;
break ;
case WXK_NUMPAD_UP :
modifiers |= NSNumericPadKeyMask;
// pass through
wxFALLTHROUGH;
case WXK_UP :
shortcut = NSUpArrowFunctionKey ;
break ;
case WXK_NUMPAD_RIGHT :
modifiers |= NSNumericPadKeyMask;
// pass through
wxFALLTHROUGH;
case WXK_RIGHT :
shortcut = NSRightArrowFunctionKey ;
break ;
case WXK_NUMPAD_DOWN :
modifiers |= NSNumericPadKeyMask;
// pass through
wxFALLTHROUGH;
case WXK_DOWN :
shortcut = NSDownArrowFunctionKey ;
break ;

View File

@ -46,7 +46,7 @@ CGEventType CGEventTypeForMouseButton(int button, bool isDown)
// want to check for invalid parameters so assert first
default:
wxFAIL_MSG("Unsupported button passed in.");
// fall back to the only known remaining case
wxFALLTHROUGH;// fall back to the only known remaining case
case wxMOUSE_BTN_MIDDLE:
return isDown ? kCGEventOtherMouseDown : kCGEventOtherMouseUp;
@ -69,7 +69,7 @@ CGEventType CGEventTypeForMouseDrag(int button)
// want to check for invalid parameters so assert first
default:
wxFAIL_MSG("Unsupported button passed in.");
// fall back to the only known remaining case
wxFALLTHROUGH;// fall back to the only known remaining case
case wxMOUSE_BTN_MIDDLE:
return kCGEventOtherMouseDragged;
@ -92,7 +92,7 @@ CGMouseButton CGButtonForMouseButton(int button)
// want to check for invalid parameters so assert first
default:
wxFAIL_MSG("Unsupported button passed in.");
// fall back to the only known remaining case
wxFALLTHROUGH;// fall back to the only known remaining case
case wxMOUSE_BTN_MIDDLE:
return kCGMouseButtonCenter;

View File

@ -3053,7 +3053,7 @@ bool wxRibbonMSWArtProvider::GetButtonBarButtonSize(
break;
case wxRIBBON_BUTTON_HYBRID:
dropdown_region->SetX(dropdown_region->GetX() + text_size);
// no break
wxFALLTHROUGH;// no break
case wxRIBBON_BUTTON_NORMAL:
case wxRIBBON_BUTTON_TOGGLE:
normal_region->SetWidth(normal_region->GetWidth() + text_size);

View File

@ -95,12 +95,14 @@ public:
*size = wxRIBBON_BUTTONBAR_BUTTON_MEDIUM;
break;
}
wxFALLTHROUGH;
case wxRIBBON_BUTTONBAR_BUTTON_MEDIUM:
if(sizes[wxRIBBON_BUTTONBAR_BUTTON_SMALL].is_supported)
{
*size = wxRIBBON_BUTTONBAR_BUTTON_SMALL;
break;
}
wxFALLTHROUGH;
case wxRIBBON_BUTTONBAR_BUTTON_SMALL:
default:
return false;

View File

@ -1005,13 +1005,13 @@ int ScintillaWX::DoKeyDown(const wxKeyEvent& evt, bool* consumed)
case WXK_ESCAPE: key = SCK_ESCAPE; break;
case WXK_BACK: key = SCK_BACK; break;
case WXK_TAB: key = SCK_TAB; break;
case WXK_NUMPAD_ENTER: // fall through
case WXK_NUMPAD_ENTER: wxFALLTHROUGH;
case WXK_RETURN: key = SCK_RETURN; break;
case WXK_ADD: // fall through
case WXK_ADD: wxFALLTHROUGH;
case WXK_NUMPAD_ADD: key = SCK_ADD; break;
case WXK_SUBTRACT: // fall through
case WXK_SUBTRACT: wxFALLTHROUGH;
case WXK_NUMPAD_SUBTRACT: key = SCK_SUBTRACT; break;
case WXK_DIVIDE: // fall through
case WXK_DIVIDE: wxFALLTHROUGH;
case WXK_NUMPAD_DIVIDE: key = SCK_DIVIDE; break;
case WXK_CONTROL: key = 0; break;
case WXK_ALT: key = 0; break;

View File

@ -178,7 +178,7 @@ void wxSocketImplUnix::OnReadWaiting()
default:
wxFAIL_MSG( "unexpected CheckForInput() return value" );
// fall through
wxFALLTHROUGH;
case -1:
if ( GetLastError() == wxSOCKET_WOULDBLOCK )

View File

@ -237,7 +237,7 @@ wxMutexInternal::wxMutexInternal(wxMutexType mutexType)
default:
wxFAIL_MSG( wxT("unknown mutex type") );
// fall through
wxFALLTHROUGH;
case wxMUTEX_DEFAULT:
err = pthread_mutex_init(&m_mutex, NULL);
@ -1543,7 +1543,7 @@ wxThreadError wxThread::Delete(ExitCode *rc, wxThreadWait WXUNUSED(waitMode))
// PthreadStart()
m_internal->SignalRun();
// fall through
wxFALLTHROUGH;
case STATE_EXITED:
// nothing to do
@ -1553,7 +1553,7 @@ wxThreadError wxThread::Delete(ExitCode *rc, wxThreadWait WXUNUSED(waitMode))
// resume the thread first
m_internal->Resume();
// fall through
wxFALLTHROUGH;
default:
if ( !isDetached )
@ -1595,7 +1595,7 @@ wxThreadError wxThread::Kill()
// resume the thread first
Resume();
// fall through
wxFALLTHROUGH;
default:
#ifdef HAVE_PTHREAD_CANCEL

View File

@ -305,14 +305,14 @@ bool wxPipeInputStream::CanRead() const
{
case -1:
wxLogSysError(_("Impossible to get child process input"));
// fall through
wxFALLTHROUGH;
case 0:
return false;
default:
wxFAIL_MSG(wxT("unexpected select() return value"));
// still fall through
wxFALLTHROUGH;
case 1:
// input available -- or maybe not, as select() returns 1 when a
@ -346,7 +346,7 @@ size_t wxPipeOutputStream::OnSysWrite(const void *buffer, size_t size)
#endif
// do not treat it as an error
m_file->ClearLastError();
// fall through
wxFALLTHROUGH;
// no error
case 0:

View File

@ -1560,7 +1560,7 @@ wxString wxXmlResourceHandlerImpl::GetText(const wxString& param, bool translate
str2 << wxT('\\');
break;
}
// else fall-through to default: branch below
wxFALLTHROUGH;// else fall-through to default: branch below
default:
str2 << wxT('\\') << *dt;