Merge branch 'clang-link-error-and-semicolon-warnings' of https://github.com/MaartenBent/wxWidgets

Fix clang warnings about extra semicolons and a link error.

See https://github.com/wxWidgets/wxWidgets/pull/1434
This commit is contained in:
Vadim Zeitlin 2019-07-26 17:58:27 +02:00
commit 8ea46e70c5
23 changed files with 35 additions and 35 deletions

View File

@ -210,7 +210,7 @@ private:
};
// A plain method functor for the untyped legacy event types:
class WXDLLIMPEXP_BASE wxObjectEventFunctor : public wxEventFunctor
class wxObjectEventFunctor : public wxEventFunctor
{
public:
wxObjectEventFunctor(wxObjectEventFunction method, wxEvtHandler *handler)

View File

@ -326,7 +326,7 @@ public:
// If 'id' refers to invalid property, then we will return dummy
// attributes (i.e. root property's attributes, which contents should
// should always be empty and of no consequence).
wxPG_PROP_ARG_CALL_PROLOG_RETVAL(m_pState->DoGetRoot()->GetAttributes());
wxPG_PROP_ARG_CALL_PROLOG_RETVAL(m_pState->DoGetRoot()->GetAttributes())
return p->GetAttributes();
}

View File

@ -1703,7 +1703,7 @@ wxString BugsGridTable::GetTypeName(int WXUNUSED(row), int col)
{
case Col_Id:
case Col_Priority:
return wxGRID_VALUE_NUMBER;;
return wxGRID_VALUE_NUMBER;
case Col_Severity:
// fall thorugh (TODO should be a list)
@ -2501,7 +2501,7 @@ void GridFrame::OnRenderPaint( wxPaintEvent& event )
canvas->PrepareDC( dc );
if ( !m_gridBitmap.IsOk() )
return;;
return;
wxMemoryDC memDc( m_gridBitmap );

View File

@ -83,7 +83,7 @@ public:
return col;
}
return *wxWHITE;
};
}
return wxColour();
}

View File

@ -218,13 +218,13 @@ Client::OnCmdLineParsed(wxCmdLineParser& pParser)
if (!file.IsOpened()) {
wxLogError("Cannot open file %s",fname);
return false;
};
}
if (!file.ReadAll(&m_message)) {
wxLogError("Cannot read content of file %s",fname);
return false;
};
}
m_sendType = SEND_MESSAGE;
};
}
if (pParser.Found("s",&m_stressWorkers))
m_sendType = STRESS_TEST;
@ -440,7 +440,7 @@ Client::OnWorkerEvent(WorkerEvent& pEvent) {
m_statDone++;
m_statDisconnecting--;
break;
};
}
if (pEvent.isFailed() || pEvent.m_eventType == WorkerEvent::DONE)
{
@ -719,7 +719,7 @@ wxThread::ExitCode ThreadWorker::Entry()
etype = WorkerEvent::DISCONNECTING;
WorkerEvent e(this,etype);
wxGetApp().AddPendingEvent(e);
};
}
m_clientSocket->Close();
m_clientSocket->Destroy();
m_clientSocket = NULL;

View File

@ -408,7 +408,7 @@ void Server::OnSocketEvent(wxSocketEvent& pEvent)
else
{
wxLogError("Server: cannot create next thread (current threads: %d", m_threadWorkers.size());
};
}
}
else
{

View File

@ -2042,7 +2042,7 @@ bool wxEventBlocker::ProcessEvent(wxEvent& event)
return true; // yes, it should: mark this event as processed
}
return wxEvtHandler::ProcessEvent(event);;
return wxEvtHandler::ProcessEvent(event);
}
#endif // wxUSE_GUI

View File

@ -212,7 +212,7 @@ wxString wxGetStockLabel(wxWindowID id, long flags)
default:
wxFAIL_MSG( wxT("invalid stock item ID") );
break;
};
}
#undef STOCKITEM
@ -314,7 +314,7 @@ wxAcceleratorEntry wxGetStockAccelerator(wxWindowID id)
// there's no stock accelerator for that.
ret.Set(0, 0, id);
break;
};
}
#undef STOCKITEM

View File

@ -737,7 +737,7 @@ size_t wxStrlen(const wxChar32 *s )
{
if (!s) return 0;
size_t i=0;
while (*s!=0) { ++i; ++s; };
while (*s!=0) { ++i; ++s; }
return i;
}

View File

@ -806,7 +806,7 @@ bool wxDDEConnection::DoAdvise(const wxString& item,
case wxIPC_LOCALE:
wxFAIL_MSG( "Unsupported IPC format for Advise()" );
return false;
};
}
bool ok = DdePostAdvise(DDEIdInst, topic_atom, item_atom) != 0;
if ( !ok )

View File

@ -821,7 +821,7 @@ bool wxFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control)
}
#endif // wxUSE_TASKBARBUTTON
return wxFrameBase::HandleCommand(id, cmd, control);;
return wxFrameBase::HandleCommand(id, cmd, control);
}
// ---------------------------------------------------------------------------

View File

@ -170,7 +170,7 @@ static void PixelsToHimetric(SIZEL &sz)
logX = GetDeviceCaps(dc, LOGPIXELSX);
logY = GetDeviceCaps(dc, LOGPIXELSY);
ReleaseDC(NULL, dc);
};
}
#define HIMETRIC_INCH 2540
#define CONVERT(x, logpixels) wxMulDivInt32(HIMETRIC_INCH, (x), (logpixels))

View File

@ -119,7 +119,7 @@ bool wxSlider::Create(wxWindow *parent,
// no, choose default
style |= wxSL_BOTTOM | wxSL_HORIZONTAL;
}
};
}
wxASSERT_MSG( !(style & wxSL_VERTICAL) || !(style & wxSL_HORIZONTAL),
wxT("incompatible slider direction and orientation") );

View File

@ -5082,7 +5082,7 @@ wxColour wxWindowMSW::MSWGetThemeColour(const wchar_t *themeName,
break;
default:
wxFAIL_MSG(wxT("unsupported theme colour"));
};
}
wxUxThemeHandle hTheme((const wxWindow *)this, themeName);
COLORREF col;

View File

@ -2053,7 +2053,7 @@ void wxRibbonMSWArtProvider::DrawGalleryButton(wxDC& dc,
rect.y++;
if(m_flags & wxRIBBON_BAR_FLOW_VERTICAL)
{
rect.width--;;
rect.width--;
rect.height -= 2;
}
else
@ -3179,7 +3179,7 @@ bool wxRibbonMSWArtProvider::GetButtonBarButtonSize(
}
break;
}
};
}
return true;
}

View File

@ -672,7 +672,7 @@ void wxRibbonBar::RecalculateTabSizes()
continue;
if(info->small_must_have_separator_width * (int)(numtabs - i) <= width)
{
info->rect.width = info->small_must_have_separator_width;;
info->rect.width = info->small_must_have_separator_width;
}
else
{

View File

@ -874,7 +874,7 @@ wxString wxRichTextFontListBox::CreateHTML(const wxString& facename) const
{
wxString str = wxT("<font");
str << wxT(" size=\"+2\"");;
str << wxT(" size=\"+2\"");
if (!facename.IsEmpty() && facename != _("(none)"))
str << wxT(" face=\"") << facename << wxT("\"");

View File

@ -43,7 +43,7 @@ wxCalendarCtrlXmlHandler::wxCalendarCtrlXmlHandler()
wxObject *wxCalendarCtrlXmlHandler::DoCreateResource()
{
XRC_MAKE_INSTANCE(calendar, wxCalendarCtrl);
XRC_MAKE_INSTANCE(calendar, wxCalendarCtrl)
calendar->Create(m_parentAsWindow,
GetID(),

View File

@ -50,7 +50,7 @@ wxDialogXmlHandler::wxDialogXmlHandler() : wxXmlResourceHandler()
wxObject *wxDialogXmlHandler::DoCreateResource()
{
XRC_MAKE_INSTANCE(dlg, wxDialog);
XRC_MAKE_INSTANCE(dlg, wxDialog)
dlg->Create(m_parentAsWindow,
GetID(),

View File

@ -55,7 +55,7 @@ wxFrameXmlHandler::wxFrameXmlHandler() : wxXmlResourceHandler()
wxObject *wxFrameXmlHandler::DoCreateResource()
{
XRC_MAKE_INSTANCE(frame, wxFrame);
XRC_MAKE_INSTANCE(frame, wxFrame)
frame->Create(m_parentAsWindow,
GetID(),

View File

@ -59,7 +59,7 @@ wxWindow *wxMdiXmlHandler::CreateFrame()
{
if (m_class == wxT("wxMDIParentFrame"))
{
XRC_MAKE_INSTANCE(frame, wxMDIParentFrame);
XRC_MAKE_INSTANCE(frame, wxMDIParentFrame)
frame->Create(m_parentAsWindow,
GetID(),
@ -80,7 +80,7 @@ wxWindow *wxMdiXmlHandler::CreateFrame()
return NULL;
}
XRC_MAKE_INSTANCE(frame, wxMDIChildFrame);
XRC_MAKE_INSTANCE(frame, wxMDIChildFrame)
frame->Create(mdiParent,
GetID(),

View File

@ -115,7 +115,7 @@ void wxRibbonXmlHandler::Handle_RibbonArtProvider(wxRibbonControl *control)
wxObject* wxRibbonXmlHandler::Handle_buttonbar()
{
XRC_MAKE_INSTANCE (buttonBar, wxRibbonButtonBar);
XRC_MAKE_INSTANCE (buttonBar, wxRibbonButtonBar)
if (!buttonBar->Create (wxDynamicCast(m_parent, wxWindow), GetID(),
GetPosition(), GetSize(), GetStyle()))
@ -225,7 +225,7 @@ wxObject* wxRibbonXmlHandler::Handle_control()
wxObject* wxRibbonXmlHandler::Handle_page()
{
XRC_MAKE_INSTANCE (ribbonPage, wxRibbonPage);
XRC_MAKE_INSTANCE (ribbonPage, wxRibbonPage)
if (!ribbonPage->Create (wxDynamicCast(m_parent, wxRibbonBar), GetID(),
GetText ("label"), GetBitmap ("icon"), GetStyle()))
@ -248,7 +248,7 @@ wxObject* wxRibbonXmlHandler::Handle_page()
wxObject* wxRibbonXmlHandler::Handle_gallery()
{
XRC_MAKE_INSTANCE (ribbonGallery, wxRibbonGallery);
XRC_MAKE_INSTANCE (ribbonGallery, wxRibbonGallery)
if (!ribbonGallery->Create (wxDynamicCast(m_parent, wxWindow), GetID(),
GetPosition(), GetSize(), GetStyle()))
@ -281,7 +281,7 @@ wxObject* wxRibbonXmlHandler::Handle_galleryitem()
wxObject* wxRibbonXmlHandler::Handle_panel()
{
XRC_MAKE_INSTANCE (ribbonPanel, wxRibbonPanel);
XRC_MAKE_INSTANCE (ribbonPanel, wxRibbonPanel)
if (!ribbonPanel->Create (wxDynamicCast(m_parent, wxWindow), GetID(),
GetText ("label"), GetBitmap ("icon"), GetPosition(), GetSize(),
@ -301,7 +301,7 @@ wxObject* wxRibbonXmlHandler::Handle_panel()
wxObject* wxRibbonXmlHandler::Handle_bar()
{
XRC_MAKE_INSTANCE (ribbonBar, wxRibbonBar);
XRC_MAKE_INSTANCE (ribbonBar, wxRibbonBar)
Handle_RibbonArtProvider (ribbonBar);

View File

@ -43,7 +43,7 @@ wxSplitterWindowXmlHandler::wxSplitterWindowXmlHandler() : wxXmlResourceHandler(
wxObject *wxSplitterWindowXmlHandler::DoCreateResource()
{
XRC_MAKE_INSTANCE(splitter, wxSplitterWindow);
XRC_MAKE_INSTANCE(splitter, wxSplitterWindow)
splitter->Create(m_parentAsWindow,
GetID(),