From 508d586ea2d6b24ac070f9ed1be5edc24bb02b16 Mon Sep 17 00:00:00 2001 From: Mattia Barbon Date: Fri, 2 Aug 2002 08:16:15 +0000 Subject: [PATCH] Patch [ 584078 ] Misc samples fixes from Dimitri Schoolwerth Addresses: printf-format warinigs indentation/style unused variable warnings used wxID_ABOUT for about menu entry removed references to "minimal sample" in other samples some other misc warinigs git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/controls/controls.cpp | 21 +++++++++++---------- samples/dnd/dnd.cpp | 2 +- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/samples/controls/controls.cpp b/samples/controls/controls.cpp index 6a64e31cf0..8dc971ecbc 100644 --- a/samples/controls/controls.cpp +++ b/samples/controls/controls.cpp @@ -757,8 +757,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) #if !defined(__WXMOTIF__) && !defined(__WIN16__) // wxStaticBitmap not working under Motif yet; and icons not allowed under WIN16. wxIcon icon = wxArtProvider::GetIcon(wxART_INFORMATION); - wxStaticBitmap *bmpStatic = new wxStaticBitmap(panel, -1, icon, - wxPoint(10, 10)); + (void) new wxStaticBitmap( panel, -1, icon, wxPoint(10, 10) ); // VZ: don't leak memory // bmpStatic = new wxStaticBitmap(panel, -1, wxNullIcon, wxPoint(50, 10)); @@ -1254,8 +1253,8 @@ void MyPanel::OnSpinCtrlText(wxCommandEvent& event) if ( m_spinctrl ) { wxString s; - s.Printf(_T("Spin ctrl text changed: now %d (from event: %s)\n"), - m_spinctrl->GetValue(), event.GetString()); + s.Printf( _T("Spin ctrl text changed: now %d (from event: %s)\n"), + m_spinctrl->GetValue(), event.GetString().c_str() ); m_text->AppendText(s); } } @@ -1265,8 +1264,8 @@ void MyPanel::OnSpinCtrl(wxSpinEvent& event) if ( m_spinctrl ) { wxString s; - s.Printf(_T("Spin ctrl changed: now %d (from event: %d)\n"), - m_spinctrl->GetValue(), event.GetInt()); + s.Printf( _T("Spin ctrl changed: now %d (from event: %ld)\n"), + m_spinctrl->GetValue(), event.GetInt() ); m_text->AppendText(s); } } @@ -1275,8 +1274,9 @@ void MyPanel::OnSpinCtrlUp(wxSpinEvent& event) { if ( m_spinctrl ) { - m_text->AppendText(wxString::Format(_T("Spin up: %d (from event: %d)\n"), - m_spinctrl->GetValue(), event.GetInt())); + m_text->AppendText( wxString::Format( + _T("Spin up: %d (from event: %ld)\n"), + m_spinctrl->GetValue(), event.GetInt() ) ); } } @@ -1284,8 +1284,9 @@ void MyPanel::OnSpinCtrlDown(wxSpinEvent& event) { if ( m_spinctrl ) { - m_text->AppendText(wxString::Format(_T("Spin down: %d (from event: %d)\n"), - m_spinctrl->GetValue(), event.GetInt())); + m_text->AppendText( wxString::Format( + _T("Spin down: %d (from event: %ld)\n"), + m_spinctrl->GetValue(), event.GetInt() ) ); } } diff --git a/samples/dnd/dnd.cpp b/samples/dnd/dnd.cpp index 892a621cc1..41b7851501 100644 --- a/samples/dnd/dnd.cpp +++ b/samples/dnd/dnd.cpp @@ -1760,7 +1760,7 @@ void DnDShapeFrame::OnDrop(wxCoord x, wxCoord y, DnDShape *shape) wxPoint pt(x, y); wxString s; - s.Printf(wxT("Shape dropped at (%ld, %ld)"), pt.x, pt.y); + s.Printf(wxT("Shape dropped at (%d, %d)"), pt.x, pt.y); SetStatusText(s); shape->Move(pt); -- 2.45.2