From 74e3313b2506b76b18ea1874cf9b835f11d7068a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 11 May 1999 12:37:53 +0000 Subject: [PATCH] unused parameter warnings suppressed git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2411 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/valgen.h | 12 ++++++------ src/common/imaggif.cpp | 3 ++- src/common/imagjpeg.cpp | 4 ++-- src/common/log.cpp | 8 ++++---- src/common/prntbase.cpp | 2 +- src/common/string.cpp | 8 ++++++-- src/common/tbarbase.cpp | 8 +++++++- src/common/wincmn.cpp | 6 +++--- src/generic/colrdlgg.cpp | 2 +- src/generic/fontdlgg.cpp | 2 +- src/generic/prntdlgg.cpp | 2 +- src/gtk/notebook.cpp | 2 +- src/gtk1/notebook.cpp | 2 +- 13 files changed, 36 insertions(+), 25 deletions(-) diff --git a/include/wx/valgen.h b/include/wx/valgen.h index 009db0c2dc..8fa29d6642 100644 --- a/include/wx/valgen.h +++ b/include/wx/valgen.h @@ -6,7 +6,7 @@ // Created: Jan 22 1999 // RCS-ID: // Copyright: (c) 1999 Kevin Smith -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_VALGENH__ @@ -33,18 +33,18 @@ public: // if you're passing a reference to a validator. // Another possibility is to always pass a pointer to a new validator // (so the calling code can use a copy constructor of the relevant class). - virtual wxObject *Clone(void) const { return new wxGenericValidator(*this); } + virtual wxObject *Clone() const { return new wxGenericValidator(*this); } bool Copy(const wxGenericValidator& val); // Called when the value in the window must be validated. // This function can pop up an error message. - virtual bool Validate(wxWindow *parent) {return TRUE;} + virtual bool Validate(wxWindow * WXUNUSED(parent)) { return TRUE; } // Called to transfer data to the window - virtual bool TransferToWindow(void); + virtual bool TransferToWindow(); // Called to transfer data to the window - virtual bool TransferFromWindow(void); + virtual bool TransferFromWindow(); protected: void Initialize(); @@ -55,4 +55,4 @@ protected: wxArrayInt* m_pArrayInt; }; -#endif // _WX_VALGENH__ +#endif // _WX_VALGENH__ diff --git a/src/common/imaggif.cpp b/src/common/imaggif.cpp index cae432499b..596c9932d5 100644 --- a/src/common/imaggif.cpp +++ b/src/common/imaggif.cpp @@ -413,7 +413,8 @@ bool wxGIFHandler::LoadFile( wxImage *image, wxInputStream& stream ) return TRUE; } -bool wxGIFHandler::SaveFile( wxImage *image, wxOutputStream& stream ) +bool wxGIFHandler::SaveFile( wxImage * WXUNUSED(image), + wxOutputStream& WXUNUSED(stream) ) { wxLogDebug(_T("wxGIFHandler is read-only!!")); return FALSE; diff --git a/src/common/imagjpeg.cpp b/src/common/imagjpeg.cpp index 5e5be5b20e..07bc8934cb 100644 --- a/src/common/imagjpeg.cpp +++ b/src/common/imagjpeg.cpp @@ -76,11 +76,11 @@ typedef struct { typedef my_source_mgr * my_src_ptr; -METHODDEF(void) my_init_source ( j_decompress_ptr cinfo ) +METHODDEF(void) my_init_source ( j_decompress_ptr WXUNUSED(cinfo) ) { } -METHODDEF(boolean) my_fill_input_buffer ( j_decompress_ptr cinfo ) +METHODDEF(boolean) my_fill_input_buffer ( j_decompress_ptr WXUNUSED(cinfo) ) { return TRUE; } diff --git a/src/common/log.cpp b/src/common/log.cpp index 243df81ac1..dec2e21482 100644 --- a/src/common/log.cpp +++ b/src/common/log.cpp @@ -349,7 +349,7 @@ void wxLog::DoLog(wxLogLevel level, const wxChar *szString, time_t t) } } -void wxLog::DoLogString(const wxChar *WXUNUSED(szString), time_t t) +void wxLog::DoLogString(const wxChar *WXUNUSED(szString), time_t WXUNUSED(t)) { wxFAIL_MSG(_T("DoLogString must be overriden if it's called.")); } @@ -371,7 +371,7 @@ wxLogStderr::wxLogStderr(FILE *fp) m_fp = fp; } -void wxLogStderr::DoLogString(const wxChar *szString, time_t t) +void wxLogStderr::DoLogString(const wxChar *szString, time_t WXUNUSED(t)) { wxString str(szString); str << _T('\n'); @@ -399,7 +399,7 @@ wxLogStream::wxLogStream(ostream *ostr) m_ostr = ostr; } -void wxLogStream::DoLogString(const wxChar *szString, time_t t) +void wxLogStream::DoLogString(const wxChar *szString, time_t WXUNUSED(t)) { (*m_ostr) << wxConv_libc.cWX2MB(szString) << endl << flush; } @@ -805,7 +805,7 @@ void wxLogWindow::DoLog(wxLogLevel level, const wxChar *szString, time_t t) m_bHasMessages = TRUE; } -void wxLogWindow::DoLogString(const wxChar *szString, time_t t) +void wxLogWindow::DoLogString(const wxChar *szString, time_t WXUNUSED(t)) { // put the text into our window wxTextCtrl *pText = m_pLogFrame->TextCtrl(); diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index 5a95be8d6a..1306c71e5b 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -430,7 +430,7 @@ wxPreviewFrame::~wxPreviewFrame() { } -void wxPreviewFrame::OnCloseWindow(wxCloseEvent& event) +void wxPreviewFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) { MakeModal(FALSE); diff --git a/src/common/string.cpp b/src/common/string.cpp index f7ce5fafae..db8db9a004 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -1896,12 +1896,16 @@ static char utf7_setB[]="ABCDEFGHIJKLMNOPQRSTUVWXYZ" #endif // TODO: write actual implementations of UTF-7 here -size_t wxMBConvUTF7::MB2WC(wchar_t *buf, const char *psz, size_t n) const +size_t wxMBConvUTF7::MB2WC(wchar_t * WXUNUSED(buf), + const char * WXUNUSED(psz), + size_t WXUNUSED(n)) const { return 0; } -size_t wxMBConvUTF7::WC2MB(char *buf, const wchar_t *psz, size_t n) const +size_t wxMBConvUTF7::WC2MB(char * WXUNUSED(buf), + const wchar_t * WXUNUSED(psz), + size_t WXUNUSED(n)) const { return 0; } diff --git a/src/common/tbarbase.cpp b/src/common/tbarbase.cpp index b71f343ad5..ae86a28759 100644 --- a/src/common/tbarbase.cpp +++ b/src/common/tbarbase.cpp @@ -724,7 +724,13 @@ void wxToolBarBase::ViewStart (int *x, int *y) const *y = m_yScrollPosition; } -void wxToolBarBase::OnIdle(wxIdleEvent& event) +void wxToolBarBase::OnIdle(wxIdleEvent& +#ifdef __WXGTK__ + WXUNUSED(event) +#else + event +#endif + ) { #ifndef __WXGTK__ wxWindow::OnIdle(event); diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 7b710bd120..fd7ded32ac 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -138,8 +138,8 @@ void wxWindowBase::InitBase() // common part of window creation process bool wxWindowBase::CreateBase(wxWindowBase *parent, wxWindowID id, - const wxPoint& pos, - const wxSize& size, + const wxPoint& WXUNUSED(pos), + const wxSize& WXUNUSED(size), long style, const wxString& name) { @@ -562,7 +562,7 @@ wxWindow *wxWindowBase::FindWindow( const wxString& name ) // dialog oriented functions // ---------------------------------------------------------------------------- -void wxWindowBase::MakeModal(bool modal) +void wxWindowBase::MakeModal(bool WXUNUSED(modal)) { wxFAIL_MSG("TODO"); } diff --git a/src/generic/colrdlgg.cpp b/src/generic/colrdlgg.cpp index f04731070b..5e84552d4a 100644 --- a/src/generic/colrdlgg.cpp +++ b/src/generic/colrdlgg.cpp @@ -130,7 +130,7 @@ wxGenericColourDialog::~wxGenericColourDialog(void) { } -void wxGenericColourDialog::OnCloseWindow(wxCloseEvent& event) +void wxGenericColourDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) { EndModal(wxID_CANCEL); } diff --git a/src/generic/fontdlgg.cpp b/src/generic/fontdlgg.cpp index 60b454b720..c48439da7f 100644 --- a/src/generic/fontdlgg.cpp +++ b/src/generic/fontdlgg.cpp @@ -133,7 +133,7 @@ wxGenericFontDialog::~wxGenericFontDialog(void) { } -void wxGenericFontDialog::OnCloseWindow(wxCloseEvent& event) +void wxGenericFontDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) { EndModal(wxID_CANCEL); } diff --git a/src/generic/prntdlgg.cpp b/src/generic/prntdlgg.cpp index 45682912d3..10ab2dcf48 100644 --- a/src/generic/prntdlgg.cpp +++ b/src/generic/prntdlgg.cpp @@ -125,7 +125,7 @@ wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent, Init(parent); } -void wxGenericPrintDialog::Init(wxWindow *parent) +void wxGenericPrintDialog::Init(wxWindow * WXUNUSED(parent)) { // wxDialog::Create(parent, -1, _("Print"), wxPoint(0, 0), wxSize(600, 600), // wxDEFAULT_DIALOG_STYLE | wxDIALOG_MODAL | wxTAB_TRAVERSAL); diff --git a/src/gtk/notebook.cpp b/src/gtk/notebook.cpp index ccb0e81623..a5363e40a9 100644 --- a/src/gtk/notebook.cpp +++ b/src/gtk/notebook.cpp @@ -528,7 +528,7 @@ void wxNotebook::SetPadding( const wxSize &WXUNUSED(padding) ) wxFAIL_MSG( _T("wxNotebook::SetPadding not implemented") ); } -void wxNotebook::SetTabSize(const wxSize& sz) +void wxNotebook::SetTabSize(const wxSize& WXUNUSED(sz)) { wxFAIL_MSG( _T("wxNotebook::SetTabSize not implemented") ); } diff --git a/src/gtk1/notebook.cpp b/src/gtk1/notebook.cpp index ccb0e81623..a5363e40a9 100644 --- a/src/gtk1/notebook.cpp +++ b/src/gtk1/notebook.cpp @@ -528,7 +528,7 @@ void wxNotebook::SetPadding( const wxSize &WXUNUSED(padding) ) wxFAIL_MSG( _T("wxNotebook::SetPadding not implemented") ); } -void wxNotebook::SetTabSize(const wxSize& sz) +void wxNotebook::SetTabSize(const wxSize& WXUNUSED(sz)) { wxFAIL_MSG( _T("wxNotebook::SetTabSize not implemented") ); } -- 2.45.2