From f9e02ac76b28a6787e7714a5c1f6ade2d46cd7a0 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Mon, 9 Nov 1998 06:15:41 +0000 Subject: [PATCH] Suppressed warnings git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@972 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/motif.inc | 4 ---- src/motif/bitmap.cpp | 33 +++++++++++++++++++-------------- src/motif/bmpbuttn.cpp | 2 ++ src/motif/button.cpp | 2 +- src/motif/choice.cpp | 7 +++---- src/motif/combobox.cpp | 4 ++-- src/motif/cursor.cpp | 2 +- src/motif/dialog.cpp | 23 +++++++++++++---------- src/motif/filedlg.cpp | 7 ++++--- 9 files changed, 45 insertions(+), 39 deletions(-) diff --git a/src/motif.inc b/src/motif.inc index 24a41d4958..aedd2d2094 100644 --- a/src/motif.inc +++ b/src/motif.inc @@ -72,9 +72,7 @@ LIB_CPP_SRC=\ motif/brush.cpp \ motif/button.cpp \ motif/checkbox.cpp \ - motif/chcklst.cpp \ motif/choice.cpp \ - motif/clipbrd.cpp \ motif/colordlg.cpp \ motif/colour.cpp \ motif/control.cpp \ @@ -85,8 +83,6 @@ LIB_CPP_SRC=\ motif/dcclient.cpp \ motif/dcmemory.cpp \ motif/dcscreen.cpp \ - motif/dnd.cpp \ - motif/dirdlg.cpp \ motif/dialog.cpp \ motif/filedlg.cpp \ motif/font.cpp \ diff --git a/src/motif/bitmap.cpp b/src/motif/bitmap.cpp index 93eb32f732..78272ccdf0 100644 --- a/src/motif/bitmap.cpp +++ b/src/motif/bitmap.cpp @@ -397,7 +397,7 @@ wxMask::~wxMask() } // Create a mask from a mono bitmap (copies the bitmap). -bool wxMask::Create(const wxBitmap& bitmap) +bool wxMask::Create(const wxBitmap& WXUNUSED(bitmap)) { // TODO return FALSE; @@ -405,7 +405,7 @@ bool wxMask::Create(const wxBitmap& bitmap) // Create a mask from a bitmap and a palette index indicating // the transparent area -bool wxMask::Create(const wxBitmap& bitmap, int paletteIndex) +bool wxMask::Create(const wxBitmap& WXUNUSED(bitmap), int WXUNUSED(paletteIndex)) { // TODO return FALSE; @@ -413,7 +413,7 @@ bool wxMask::Create(const wxBitmap& bitmap, int paletteIndex) // Create a mask from a bitmap and a colour indicating // the transparent area -bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour) +bool wxMask::Create(const wxBitmap& WXUNUSED(bitmap), const wxColour& WXUNUSED(colour)) { // TODO return FALSE; @@ -425,18 +425,20 @@ bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour) IMPLEMENT_DYNAMIC_CLASS(wxBitmapHandler, wxObject) -bool wxBitmapHandler::Create(wxBitmap *bitmap, void *data, long type, int width, int height, int depth) +bool wxBitmapHandler::Create(wxBitmap *WXUNUSED(bitmap), void *WXUNUSED(data), long WXUNUSED(type), + int WXUNUSED(width), int WXUNUSED(height), int WXUNUSED(depth)) { return FALSE; } -bool wxBitmapHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long type, - int desiredWidth, int desiredHeight) +bool wxBitmapHandler::LoadFile(wxBitmap *WXUNUSED(bitmap), const wxString& WXUNUSED(name), long WXUNUSED(type), + int WXUNUSED(desiredWidth), int WXUNUSED(desiredHeight)) { return FALSE; } -bool wxBitmapHandler::SaveFile(wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette) +bool wxBitmapHandler::SaveFile(wxBitmap *WXUNUSED(bitmap), const wxString& WXUNUSED(name), int WXUNUSED(type), + const wxPalette *WXUNUSED(palette)) { return FALSE; } @@ -461,8 +463,8 @@ public: }; IMPLEMENT_DYNAMIC_CLASS(wxXBMFileHandler, wxBitmapHandler) -bool wxXBMFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags, - int desiredWidth, int desiredHeight) +bool wxXBMFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long WXUNUSED(flags), + int WXUNUSED(desiredWidth), int WXUNUSED(desiredHeight)) { M_BITMAPHANDLERDATA->m_freePixmap = TRUE; @@ -508,7 +510,8 @@ public: }; IMPLEMENT_DYNAMIC_CLASS(wxXBMDataHandler, wxBitmapHandler) -bool wxXBMDataHandler::Create(wxBitmap *bitmap, void *data, long flags, int width, int height, int depth) +bool wxXBMDataHandler::Create( wxBitmap *bitmap, void *data, long WXUNUSED(flags), + int width, int height, int WXUNUSED(depth)) { M_BITMAPHANDLERDATA->m_width = width; M_BITMAPHANDLERDATA->m_height = height; @@ -594,8 +597,8 @@ public: IMPLEMENT_DYNAMIC_CLASS(wxXPMFileHandler, wxBitmapHandler) -bool wxXPMFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags, - int desiredWidth, int desiredHeight) +bool wxXPMFileHandler::LoadFile( wxBitmap *bitmap, const wxString& name, long WXUNUSED(flags), + int WXUNUSED(desiredWidth), int WXUNUSED(desiredHeight) ) { Display *dpy = (Display*) wxGetDisplay(); M_BITMAPHANDLERDATA->m_display = (WXDisplay*) dpy; @@ -656,7 +659,8 @@ bool wxXPMFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long fla } } -bool wxXPMFileHandler::SaveFile(wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette) +bool wxXPMFileHandler::SaveFile( wxBitmap *bitmap, const wxString& name, int WXUNUSED(type), + const wxPalette *WXUNUSED(palette)) { if (M_BITMAPHANDLERDATA->m_ok && M_BITMAPHANDLERDATA->m_pixmap) { @@ -689,7 +693,8 @@ public: }; IMPLEMENT_DYNAMIC_CLASS(wxXPMDataHandler, wxBitmapHandler) -bool wxXPMDataHandler::Create(wxBitmap *bitmap, void *data, long flags, int width, int height, int depth) +bool wxXPMDataHandler::Create( wxBitmap *bitmap, void *data, long WXUNUSED(flags), + int width, int height, int WXUNUSED(depth)) { M_BITMAPHANDLERDATA->m_width = width; M_BITMAPHANDLERDATA->m_height = height; diff --git a/src/motif/bmpbuttn.cpp b/src/motif/bmpbuttn.cpp index 2be27c9439..9d30cc7d6c 100644 --- a/src/motif/bmpbuttn.cpp +++ b/src/motif/bmpbuttn.cpp @@ -56,10 +56,12 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit m_marginX = 0; m_marginY = 0; +/* int x = pos.x; int y = pos.y; int width = size.x; int height = size.y; +*/ if (id == -1) m_windowId = NewControlId(); diff --git a/src/motif/button.cpp b/src/motif/button.cpp index c3f5be3ec4..6a2a632465 100644 --- a/src/motif/button.cpp +++ b/src/motif/button.cpp @@ -124,7 +124,7 @@ void wxButton::Command (wxCommandEvent & event) ProcessCommand (event); } -void wxButtonCallback (Widget w, XtPointer clientData, XtPointer ptr) +void wxButtonCallback (Widget w, XtPointer clientData, XtPointer WXUNUSED(ptr)) { if (!wxGetWindowFromTable(w)) // Widget has been deleted! diff --git a/src/motif/choice.cpp b/src/motif/choice.cpp index 2585d18a6a..e21631b19a 100644 --- a/src/motif/choice.cpp +++ b/src/motif/choice.cpp @@ -84,7 +84,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id, */ m_menuWidget = (WXWidget) XmCreatePulldownMenu ((Widget) m_formWidget, "choiceMenu", NULL, 0); - int i; +// int i; if (n > 0) { int i; @@ -207,7 +207,7 @@ void wxChoice::Append(const wxString& item) m_noStrings ++; } -void wxChoice::Delete(int n) +void wxChoice::Delete(int WXUNUSED(n)) { wxFAIL_MSG( "Sorry, wxChoice::Delete isn't implemented yet. Maybe you'd like to volunteer? :-)" ); @@ -404,8 +404,7 @@ void wxChoice::Command(wxCommandEvent & event) ProcessCommand (event); } -void wxChoiceCallback (Widget w, XtPointer clientData, - XtPointer ptr) +void wxChoiceCallback (Widget w, XtPointer clientData, XtPointer WXUNUSED(ptr)) { wxChoice *item = (wxChoice *) clientData; if (item) diff --git a/src/motif/combobox.cpp b/src/motif/combobox.cpp index 95d66b984d..8361a2b102 100644 --- a/src/motif/combobox.cpp +++ b/src/motif/combobox.cpp @@ -131,7 +131,7 @@ void wxComboBox::Paste() XmComboBoxPaste((Widget) m_mainWidget); } -void wxComboBox::SetEditable(bool editable) +void wxComboBox::SetEditable(bool WXUNUSED(editable)) { // TODO } @@ -176,7 +176,7 @@ void wxComboBox::SetSelection(long from, long to) (Time) 0); } -void wxComboBoxCallback (Widget w, XtPointer clientData, +void wxComboBoxCallback (Widget WXUNUSED(w), XtPointer clientData, XmComboBoxSelectionCallbackStruct * cbs) { wxComboBox *item = (wxComboBox *) clientData; diff --git a/src/motif/cursor.cpp b/src/motif/cursor.cpp index 829a616a5b..c1027a775e 100644 --- a/src/motif/cursor.cpp +++ b/src/motif/cursor.cpp @@ -428,7 +428,7 @@ WXCursor wxCursor::MakeCursor(WXDisplay* display, wxStockCursor id) } // Global cursor setting -void wxSetCursor(const wxCursor& cursor) +void wxSetCursor(const wxCursor& WXUNUSED(cursor)) { // Nothing to do for Motif (no global cursor) } diff --git a/src/motif/dialog.cpp b/src/motif/dialog.cpp index 7edbb5df91..12f3a7ffad 100644 --- a/src/motif/dialog.cpp +++ b/src/motif/dialog.cpp @@ -521,7 +521,7 @@ void wxDialog::EndModal(int retCode) } // Standard buttons -void wxDialog::OnOK(wxCommandEvent& event) +void wxDialog::OnOK(wxCommandEvent& WXUNUSED(event)) { if ( Validate() && TransferDataFromWindow() ) { @@ -535,14 +535,14 @@ void wxDialog::OnOK(wxCommandEvent& event) } } -void wxDialog::OnApply(wxCommandEvent& event) +void wxDialog::OnApply(wxCommandEvent& WXUNUSED(event)) { if (Validate()) TransferDataFromWindow(); // TODO probably need to disable the Apply button until things change again } -void wxDialog::OnCancel(wxCommandEvent& event) +void wxDialog::OnCancel(wxCommandEvent& WXUNUSED(event)) { if ( IsModal() ) EndModal(wxID_CANCEL); @@ -592,7 +592,7 @@ bool wxDialog::Destroy() return TRUE; } -void wxDialog::OnSysColourChanged(wxSysColourChangedEvent& event) +void wxDialog::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event)) { SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); Refresh(); @@ -603,7 +603,8 @@ void wxDialog::Fit() } // Handle a close event from the window manager -static void wxCloseDialogCallback(Widget widget, XtPointer client_data, XmAnyCallbackStruct *cbs) +static void wxCloseDialogCallback( Widget WXUNUSED(widget), XtPointer client_data, + XmAnyCallbackStruct *WXUNUSED(cbs)) { wxDialog *dialog = (wxDialog *)client_data; wxCloseEvent closeEvent(wxEVT_CLOSE_WINDOW, dialog->GetId()); @@ -615,15 +616,17 @@ static void wxCloseDialogCallback(Widget widget, XtPointer client_data, XmAnyCal // TODO: Preferably, we should have a universal repaint proc. // Meanwhile, use a special one for dialogs. -static void wxDialogBoxRepaintProc(Widget w, XtPointer c_data, XEvent *event, char *) +static void wxDialogBoxRepaintProc(Widget w, XtPointer WXUNUSED(c_data), XEvent *event, char *) { Window window; - static XRectangle *xrect; Display *display; +/* + static XRectangle *xrect; GC gc; int llp = 0; static int last_count = 0; static int draw_count = 0; +*/ wxWindow* win = (wxWindow *)wxWidgetHashTable->Get((long)w); if (!win) @@ -696,7 +699,7 @@ static void wxDialogBoxRepaintProc(Widget w, XtPointer c_data, XEvent *event, ch } static void wxDialogBoxEventHandler (Widget wid, - XtPointer client_data, + XtPointer WXUNUSED(client_data), XEvent* event, Boolean *continueToDispatch) { @@ -738,7 +741,7 @@ static void wxDialogBoxEventHandler (Widget wid, *continueToDispatch = True; } -static void wxUnmapBulletinBoard(Widget dialog, wxDialog *client,XtPointer call) +static void wxUnmapBulletinBoard(Widget WXUNUSED(dialog), wxDialog *WXUNUSED(client), XtPointer WXUNUSED(call) ) { /* This gets called when the dialog is being shown, which * defeats modal showing. @@ -747,7 +750,7 @@ static void wxUnmapBulletinBoard(Widget dialog, wxDialog *client,XtPointer call) */ } -void wxDialog::ChangeFont(bool keepOriginalSize) +void wxDialog::ChangeFont(bool WXUNUSED(keepOriginalSize)) { // TODO } diff --git a/src/motif/filedlg.cpp b/src/motif/filedlg.cpp index b94e314e2f..81567f5d87 100644 --- a/src/motif/filedlg.cpp +++ b/src/motif/filedlg.cpp @@ -107,13 +107,14 @@ char *wxFileSelectorEx(const char *title, wxString wxFileDialog::m_fileSelectorAnswer = ""; bool wxFileDialog::m_fileSelectorReturned = FALSE; -void wxFileSelCancel(Widget fs, XtPointer client_data, XmFileSelectionBoxCallbackStruct *cbs) +void wxFileSelCancel( Widget WXUNUSED(fs), XtPointer WXUNUSED(client_data), + XmFileSelectionBoxCallbackStruct *WXUNUSED(cbs) ) { wxFileDialog::m_fileSelectorAnswer = ""; wxFileDialog::m_fileSelectorReturned = TRUE; } -void wxFileSelOk(Widget fs, XtPointer client_data, XmFileSelectionBoxCallbackStruct *cbs) +void wxFileSelOk(Widget WXUNUSED(fs), XtPointer WXUNUSED(client_data), XmFileSelectionBoxCallbackStruct *cbs) { char *filename = NULL; if (!XmStringGetLtoR(cbs->value, XmSTRING_DEFAULT_CHARSET, &filename)) { @@ -147,7 +148,7 @@ int wxFileDialog::ShowModal() { wxBeginBusyCursor(); - static char fileBuf[512]; +// static char fileBuf[512]; Widget parentWidget = (Widget) 0; if (m_parent) { -- 2.45.2