From: Włodzimierz Skiba Date: Wed, 8 Dec 2004 17:12:53 +0000 (+0000) Subject: Warning fixes. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c193de847bdddf3ffce6f1910df9c312b5df8853 Warning fixes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30898 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/contrib/samples/stc/edit.cpp b/contrib/samples/stc/edit.cpp index c9f53d0d84..44ce6f88c0 100644 --- a/contrib/samples/stc/edit.cpp +++ b/contrib/samples/stc/edit.cpp @@ -339,7 +339,7 @@ void Edit::OnMarginClick (wxStyledTextEvent &event) { } void Edit::OnCharAdded (wxStyledTextEvent &event) { - char chr = event.GetKey(); + char chr = (char)event.GetKey(); int currentLine = GetCurrentLine(); // Change this if support for mac files with \r is needed if (chr == '\n') { diff --git a/contrib/samples/stc/stctest.cpp b/contrib/samples/stc/stctest.cpp index 93711b1d1c..41aeba8d52 100644 --- a/contrib/samples/stc/stctest.cpp +++ b/contrib/samples/stc/stctest.cpp @@ -301,7 +301,7 @@ AppFrame::AppFrame (const wxString &title) SetBackgroundColour (_T("WHITE")); // about box shown for 1 seconds - AppAbout (this, 1000); + AppAbout dlg(this, 1000); // create menu m_menuBar = new wxMenuBar; @@ -329,7 +329,7 @@ void AppFrame::OnClose (wxCloseEvent &event) { } void AppFrame::OnAbout (wxCommandEvent &WXUNUSED(event)) { - AppAbout (this); + AppAbout dlg(this); } void AppFrame::OnExit (wxCommandEvent &WXUNUSED(event)) { @@ -387,7 +387,7 @@ void AppFrame::OnFileClose (wxCommandEvent &WXUNUSED(event)) { // properties event handlers void AppFrame::OnProperties (wxCommandEvent &WXUNUSED(event)) { if (!m_edit) return; - EditProperties (m_edit, 0); + EditProperties dlg(m_edit, 0); } // print event handlers diff --git a/contrib/src/foldbar/captionbar.cpp b/contrib/src/foldbar/captionbar.cpp index 34a46ff839..9b37b04f63 100644 --- a/contrib/src/foldbar/captionbar.cpp +++ b/contrib/src/foldbar/captionbar.cpp @@ -85,7 +85,9 @@ void wxCaptionBar::ApplyCaptionStyle(const wxCaptionBarStyle &cbstyle, bool appl { // make the second colour slightly darker then the background wxColour col = GetParent()->GetBackgroundColour(); - col.Set((col.Red() >> 1) + 20, (col.Green() >> 1) + 20, (col.Blue() >> 1) + 20); + col.Set((unsigned char)((col.Red() >> 1) + 20), + (unsigned char)((col.Green() >> 1) + 20), + (unsigned char)((col.Blue() >> 1) + 20)); newstyle.SetSecondColour(col); } @@ -241,7 +243,7 @@ void wxCaptionBar::DrawVerticalGradient(wxDC &dc, const wxRect &rect ) { currCol.Set( (unsigned char)(col1.Red() + rf), - (unsigned char)(col1.Green() + gf), + (unsigned char)(col1.Green() + gf), (unsigned char)(col1.Blue() + bf) ); dc.SetBrush( wxBrush( currCol, wxSOLID ) ); @@ -272,8 +274,8 @@ void wxCaptionBar::DrawHorizontalGradient(wxDC &dc, const wxRect &rect ) for(int x = rect.x; x < rect.x + rect.width; x++) { currCol.Set( - (unsigned char)(col1.Red() + rf), - (unsigned char)(col1.Green() + gf), + (unsigned char)(col1.Red() + rf), + (unsigned char)(col1.Green() + gf), (unsigned char)(col1.Blue() + bf) ); dc.SetBrush( wxBrush( currCol, wxSOLID ) ); diff --git a/samples/stc/edit.cpp b/samples/stc/edit.cpp index c9f53d0d84..44ce6f88c0 100644 --- a/samples/stc/edit.cpp +++ b/samples/stc/edit.cpp @@ -339,7 +339,7 @@ void Edit::OnMarginClick (wxStyledTextEvent &event) { } void Edit::OnCharAdded (wxStyledTextEvent &event) { - char chr = event.GetKey(); + char chr = (char)event.GetKey(); int currentLine = GetCurrentLine(); // Change this if support for mac files with \r is needed if (chr == '\n') { diff --git a/samples/stc/stctest.cpp b/samples/stc/stctest.cpp index 93711b1d1c..41aeba8d52 100644 --- a/samples/stc/stctest.cpp +++ b/samples/stc/stctest.cpp @@ -301,7 +301,7 @@ AppFrame::AppFrame (const wxString &title) SetBackgroundColour (_T("WHITE")); // about box shown for 1 seconds - AppAbout (this, 1000); + AppAbout dlg(this, 1000); // create menu m_menuBar = new wxMenuBar; @@ -329,7 +329,7 @@ void AppFrame::OnClose (wxCloseEvent &event) { } void AppFrame::OnAbout (wxCommandEvent &WXUNUSED(event)) { - AppAbout (this); + AppAbout dlg(this); } void AppFrame::OnExit (wxCommandEvent &WXUNUSED(event)) { @@ -387,7 +387,7 @@ void AppFrame::OnFileClose (wxCommandEvent &WXUNUSED(event)) { // properties event handlers void AppFrame::OnProperties (wxCommandEvent &WXUNUSED(event)) { if (!m_edit) return; - EditProperties (m_edit, 0); + EditProperties dlg(m_edit, 0); } // print event handlers