gcc 3.1 warning fixes (patch 598343)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16687 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-08-22 19:22:52 +00:00
parent 5f3455052c
commit 8b1d8f3611
4 changed files with 13 additions and 7 deletions

View File

@@ -272,7 +272,7 @@ public:
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxRadioBoxNameStr) const wxString& name = wxRadioBoxNameStr)
: wxRadioBox(parent, id, title, pos, size, n, choices, majorDim, : wxRadioBox(parent, id, title, pos, size, n, choices, majorDim,
style, validator, name) { } style, validator, name) { SetForegroundColour(*wxRED); }
protected: protected:
void OnFocusGot(wxFocusEvent& event) void OnFocusGot(wxFocusEvent& event)
@@ -682,6 +682,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
panel = new wxPanel(m_notebook); panel = new wxPanel(m_notebook);
(void)new MyRadioBox( panel, ID_RADIOBOX, "&That", wxPoint(10,160), wxSize(-1,-1), WXSIZEOF(choices2), choices2, 1, wxRA_SPECIFY_ROWS ); (void)new MyRadioBox( panel, ID_RADIOBOX, "&That", wxPoint(10,160), wxSize(-1,-1), WXSIZEOF(choices2), choices2, 1, wxRA_SPECIFY_ROWS );
m_radio = new wxRadioBox( panel, ID_RADIOBOX, "T&his", wxPoint(10,10), wxSize(-1,-1), WXSIZEOF(choices), choices, 1, wxRA_SPECIFY_COLS ); m_radio = new wxRadioBox( panel, ID_RADIOBOX, "T&his", wxPoint(10,10), wxSize(-1,-1), WXSIZEOF(choices), choices, 1, wxRA_SPECIFY_COLS );
m_radio->SetForegroundColour(*wxRED);
#if wxUSE_TOOLTIPS #if wxUSE_TOOLTIPS
m_combo->SetToolTip("This is a natural\ncombobox - can you believe me?"); m_combo->SetToolTip("This is a natural\ncombobox - can you believe me?");
@@ -709,6 +710,8 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
m_slider = new wxSlider( panel, ID_SLIDER, 0, 0, 200, wxPoint(18,90), wxSize(155,-1), m_slider = new wxSlider( panel, ID_SLIDER, 0, 0, 200, wxPoint(18,90), wxSize(155,-1),
wxSL_AUTOTICKS | wxSL_LABELS ); wxSL_AUTOTICKS | wxSL_LABELS );
m_slider->SetTickFreq(40, 0); m_slider->SetTickFreq(40, 0);
m_slider->SetToolTip(_T("This is a sliding slider"));
(void)new wxStaticBox( panel, -1, "&Explanation", (void)new wxStaticBox( panel, -1, "&Explanation",
wxPoint(230,10), wxSize(270,130), wxPoint(230,10), wxSize(270,130),
wxALIGN_CENTER ); wxALIGN_CENTER );
@@ -1224,6 +1227,8 @@ void MyPanel::OnRadioButtons( wxCommandEvent &event )
} }
case ID_RADIOBOX_FONT: case ID_RADIOBOX_FONT:
{ {
m_radio->SetForegroundColour(*wxGREEN);
m_radio->SetFont( *wxITALIC_FONT ); m_radio->SetFont( *wxITALIC_FONT );
break; break;
} }
@@ -1562,7 +1567,7 @@ void MyFrame::OnIdle( wxIdleEvent& WXUNUSED(event) )
#endif #endif
s_windowFocus->GetClassInfo()->GetClassName() s_windowFocus->GetClassInfo()->GetClassName()
#ifdef __WXMSW__ #ifdef __WXMSW__
, s_windowFocus->GetHWND() , (unsigned int) s_windowFocus->GetHWND()
#endif #endif
); );

View File

@@ -707,8 +707,8 @@ void MyTextCtrl::OnKeyDown(wxKeyEvent& event)
wxLogMessage( _T("Current position: %ld\nCurrent line, column: (%ld, %ld)\nNumber of lines: %ld\nCurrent line length: %ld\nTotal text length: %u (%ld)"), wxLogMessage( _T("Current position: %ld\nCurrent line, column: (%ld, %ld)\nNumber of lines: %ld\nCurrent line length: %ld\nTotal text length: %u (%ld)"),
pos, pos,
line, column, line, column,
GetNumberOfLines(), (long) GetNumberOfLines(),
GetLineLength(line), (long) GetLineLength(line),
GetValue().length(), GetValue().length(),
GetLastPosition()); GetLastPosition());
} }
@@ -1204,7 +1204,7 @@ void MyFrame::OnIdle( wxIdleEvent& event )
#endif #endif
s_windowFocus s_windowFocus
#ifdef __WXMSW__ #ifdef __WXMSW__
, s_windowFocus->GetHWND() , (unsigned int) s_windowFocus->GetHWND()
#endif #endif
); );

View File

@@ -490,7 +490,7 @@ void SliderWidgetsPage::OnSlider(wxScrollEvent& event)
If this assert is triggered, there is an unknown slider event which If this assert is triggered, there is an unknown slider event which
should be added to the above eventNames array. should be added to the above eventNames array.
*/ */
wxASSERT_MSG(index >= 0 && index < WXSIZEOF(eventNames), wxASSERT_MSG(index >= 0 && (size_t)index < WXSIZEOF(eventNames),
wxT("Unknown slider event") ); wxT("Unknown slider event") );

View File

@@ -700,7 +700,8 @@ void TextWidgetsPage::OnButtonLoad(wxCommandEvent& WXUNUSED(event))
{ {
long elapsed = sw.Time(); long elapsed = sw.Time();
wxLogMessage(_T("Loaded file '%s' in %lu.%us"), wxLogMessage(_T("Loaded file '%s' in %lu.%us"),
filename.c_str(), elapsed / 1000, elapsed % 1000); filename.c_str(), elapsed / 1000,
(unsigned int) elapsed % 1000);
} }
} }
} }