From d8207702d1cf580a7200114abd52f186b4b9a4f3 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Mon, 23 Mar 2009 15:26:33 +0000 Subject: [PATCH] fixing warnings in osx cocoa git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59778 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/cocoa/bmpbuttn.mm | 6 ++--- src/osx/cocoa/button.mm | 16 ++++++------- src/osx/cocoa/checkbox.mm | 8 +++---- src/osx/cocoa/choice.mm | 8 +++---- src/osx/cocoa/dirdlg.mm | 4 ++-- src/osx/cocoa/gauge.mm | 8 +++---- src/osx/cocoa/listbox.mm | 50 +++++++++++++-------------------------- src/osx/cocoa/menu.mm | 2 +- src/osx/cocoa/menuitem.mm | 6 +++-- src/osx/cocoa/notebook.mm | 8 ++++--- src/osx/cocoa/radiobut.mm | 10 ++++---- src/osx/cocoa/scrolbar.mm | 10 ++++---- src/osx/cocoa/slider.mm | 8 +++---- src/osx/cocoa/spinbutt.mm | 8 +++---- src/osx/cocoa/statbox.mm | 10 ++++---- src/osx/cocoa/statline.mm | 8 +++---- src/osx/cocoa/stattext.mm | 10 ++++---- src/osx/cocoa/taskbar.mm | 8 +++---- src/osx/cocoa/tglbtn.mm | 20 ++++++++-------- src/osx/cocoa/toolbar.mm | 8 ++++++- src/osx/cocoa/tooltip.mm | 8 +++---- src/osx/cocoa/utils.mm | 17 ++++++------- src/osx/cocoa/window.mm | 31 ++++++++++++------------ 23 files changed, 134 insertions(+), 138 deletions(-) diff --git a/src/osx/cocoa/bmpbuttn.mm b/src/osx/cocoa/bmpbuttn.mm index f6fbea3476..516b5fe857 100644 --- a/src/osx/cocoa/bmpbuttn.mm +++ b/src/osx/cocoa/bmpbuttn.mm @@ -23,13 +23,13 @@ #include "wx/osx/private.h" wxWidgetImplType* wxWidgetImpl::CreateBitmapButton( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), const wxBitmap& bitmap, const wxPoint& pos, const wxSize& size, long style, - long extraStyle) + long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSButton* v = [[wxNSButton alloc] initWithFrame:r]; diff --git a/src/osx/cocoa/button.mm b/src/osx/cocoa/button.mm index 97fd9450ca..750218176b 100644 --- a/src/osx/cocoa/button.mm +++ b/src/osx/cocoa/button.mm @@ -166,13 +166,13 @@ wxSize wxButton::GetDefaultSize() wxWidgetImplType* wxWidgetImpl::CreateButton( wxWindowMac* wxpeer, - wxWindowMac* parent, + wxWindowMac* WXUNUSED(parent), wxWindowID id, - const wxString& label, + const wxString& WXUNUSED(label), const wxPoint& pos, const wxSize& size, - long style, - long extraStyle) + long WXUNUSED(style), + long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSButton* v = [[wxNSButton alloc] initWithFrame:r]; @@ -253,13 +253,13 @@ void wxWidgetCocoaImpl::PerformClick() } wxWidgetImplType* wxWidgetImpl::CreateDisclosureTriangle( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), const wxString& label, const wxPoint& pos, const wxSize& size, - long style, - long extraStyle) + long WXUNUSED(style), + long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSButton* v = [[wxNSButton alloc] initWithFrame:r]; diff --git a/src/osx/cocoa/checkbox.mm b/src/osx/cocoa/checkbox.mm index b100875515..2f706c51c1 100644 --- a/src/osx/cocoa/checkbox.mm +++ b/src/osx/cocoa/checkbox.mm @@ -17,13 +17,13 @@ #include "wx/osx/private.h" wxWidgetImplType* wxWidgetImpl::CreateCheckBox( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, - const wxString& label, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), + const wxString& WXUNUSED(label), const wxPoint& pos, const wxSize& size, long style, - long extraStyle) + long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSButton* v = [[wxNSButton alloc] initWithFrame:r]; diff --git a/src/osx/cocoa/choice.mm b/src/osx/cocoa/choice.mm index 197e4d758f..78ebecbbb9 100644 --- a/src/osx/cocoa/choice.mm +++ b/src/osx/cocoa/choice.mm @@ -53,13 +53,13 @@ @end wxWidgetImplType* wxWidgetImpl::CreateChoice( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), wxMenu* menu, const wxPoint& pos, const wxSize& size, - long style, - long extraStylew) + long WXUNUSED(style), + long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSPopUpButton* v = [[wxNSPopUpButton alloc] initWithFrame:r pullsDown:NO]; diff --git a/src/osx/cocoa/dirdlg.mm b/src/osx/cocoa/dirdlg.mm index fae04d0e65..e68bf5020b 100644 --- a/src/osx/cocoa/dirdlg.mm +++ b/src/osx/cocoa/dirdlg.mm @@ -37,8 +37,8 @@ IMPLEMENT_CLASS(wxDirDialog, wxDialog) wxDirDialog::wxDirDialog(wxWindow *parent, const wxString& message, - const wxString& defaultPath, long style, const wxPoint& pos, - const wxSize& size, const wxString& name) + const wxString& defaultPath, long style, const wxPoint& WXUNUSED(pos), + const wxSize& WXUNUSED(size), const wxString& WXUNUSED(name)) { m_parent = parent; diff --git a/src/osx/cocoa/gauge.mm b/src/osx/cocoa/gauge.mm index 895a70cae8..ad4ace7a47 100644 --- a/src/osx/cocoa/gauge.mm +++ b/src/osx/cocoa/gauge.mm @@ -78,15 +78,15 @@ protected: wxWidgetImplType* wxWidgetImpl::CreateGauge( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), wxInt32 value, wxInt32 minimum, wxInt32 maximum, const wxPoint& pos, const wxSize& size, - long style, - long extraStyle) + long WXUNUSED(style), + long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSProgressIndicator* v = [[wxNSProgressIndicator alloc] initWithFrame:r]; diff --git a/src/osx/cocoa/listbox.mm b/src/osx/cocoa/listbox.mm index b1cf9192ef..dc6519ae23 100644 --- a/src/osx/cocoa/listbox.mm +++ b/src/osx/cocoa/listbox.mm @@ -239,6 +239,7 @@ protected: - (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView { + wxUnusedVar(aTableView); if ( impl ) return impl->ListGetCount(); return 0; @@ -248,6 +249,7 @@ protected: objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex { + wxUnusedVar(aTableView); wxNSTableColumn* tablecol = (wxNSTableColumn *)aTableColumn; wxListBox* lb = dynamic_cast(impl->GetWXPeer()); wxCocoaTableColumn* col = [tablecol column]; @@ -261,6 +263,7 @@ protected: setObjectValue:(id)value forTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex { + wxUnusedVar(aTableView); wxNSTableColumn* tablecol = (wxNSTableColumn *)aTableColumn; wxListBox* lb = dynamic_cast(impl->GetWXPeer()); wxCocoaTableColumn* col = [tablecol column]; @@ -309,8 +312,8 @@ unsigned int wxListWidgetCocoaImpl::ListGetCount() const // columns // -wxListWidgetColumn* wxListWidgetCocoaImpl::InsertTextColumn( unsigned pos, const wxString& title, bool editable, - wxAlignment just, int defaultWidth) +wxListWidgetColumn* wxListWidgetCocoaImpl::InsertTextColumn( unsigned pos, const wxString& WXUNUSED(title), bool editable, + wxAlignment WXUNUSED(just), int defaultWidth) { wxNSTableColumn* col1 = [[wxNSTableColumn alloc] init]; [col1 setEditable:editable]; @@ -345,8 +348,8 @@ wxListWidgetColumn* wxListWidgetCocoaImpl::InsertTextColumn( unsigned pos, const return wxcol; } -wxListWidgetColumn* wxListWidgetCocoaImpl::InsertCheckColumn( unsigned pos , const wxString& title, bool editable, - wxAlignment just, int defaultWidth ) +wxListWidgetColumn* wxListWidgetCocoaImpl::InsertCheckColumn( unsigned pos , const wxString& WXUNUSED(title), bool editable, + wxAlignment WXUNUSED(just), int defaultWidth ) { wxNSTableColumn* col1 = [[wxNSTableColumn alloc] init]; [col1 setEditable:editable]; @@ -386,31 +389,12 @@ wxListWidgetColumn* wxListWidgetCocoaImpl::InsertCheckColumn( unsigned pos , con // inserting / removing lines // -void wxListWidgetCocoaImpl::ListInsert( unsigned int n ) +void wxListWidgetCocoaImpl::ListInsert( unsigned int WXUNUSED(n) ) { -#if 0 - { - wxListBoxCocoaLine* line = new wxListBoxCocoaLine(); - line->SetLabel(items[i]); - if ( m_items.size() <= n+i ) - m_items.push_back( line ); - else - m_items.insert(m_items.begin()+n, line); -/* - NSMutableDictionary* line = [[NSMutableDictionary alloc] init]; - [line setObject:wxCFStringRef(items[i]).AsNSString() forKey:column1]; - NSMutableArray* array = [m_dataSource items]; - if ( [array count] <= n+i ) - [array addObject:line]; - else - [array insertObject:line atIndex:n]; -*/ - } -#endif [m_tableView reloadData]; } -void wxListWidgetCocoaImpl::ListDelete( unsigned int n ) +void wxListWidgetCocoaImpl::ListDelete( unsigned int WXUNUSED(n) ) { [m_tableView reloadData]; } @@ -470,19 +454,19 @@ void wxListWidgetCocoaImpl::ListScrollTo( unsigned int n ) } -void wxListWidgetCocoaImpl::UpdateLine( unsigned int n, wxListWidgetColumn* col ) +void wxListWidgetCocoaImpl::UpdateLine( unsigned int WXUNUSED(n), wxListWidgetColumn* WXUNUSED(col) ) { // TODO optimize [m_tableView reloadData]; } -void wxListWidgetCocoaImpl::UpdateLineToEnd( unsigned int n) +void wxListWidgetCocoaImpl::UpdateLineToEnd( unsigned int WXUNUSED(n)) { // TODO optimize [m_tableView reloadData]; } -void wxListWidgetCocoaImpl::controlAction(WXWidget slf,void* _cmd, void *sender) +void wxListWidgetCocoaImpl::controlAction(WXWidget WXUNUSED(slf),void* WXUNUSED(_cmd), void *WXUNUSED(sender)) { wxListBox *list = static_cast ( GetWXPeer()); wxCHECK_RET( list != NULL , wxT("Listbox expected")); @@ -496,7 +480,7 @@ void wxListWidgetCocoaImpl::controlAction(WXWidget slf,void* _cmd, void *sender) list->HandleLineEvent( sel, false ); } -void wxListWidgetCocoaImpl::controlDoubleAction(WXWidget slf,void* _cmd, void *sender) +void wxListWidgetCocoaImpl::controlDoubleAction(WXWidget WXUNUSED(slf),void* WXUNUSED(_cmd), void *WXUNUSED(sender)) { wxListBox *list = static_cast ( GetWXPeer()); wxCHECK_RET( list != NULL , wxT("Listbox expected")); @@ -512,12 +496,12 @@ void wxListWidgetCocoaImpl::controlDoubleAction(WXWidget slf,void* _cmd, void *s wxWidgetImplType* wxWidgetImpl::CreateListBox( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), const wxPoint& pos, const wxSize& size, long style, - long extraStyle) + long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; NSScrollView* scrollview = [[NSScrollView alloc] initWithFrame:r]; @@ -561,7 +545,7 @@ wxWidgetImplType* wxWidgetImpl::CreateListBox( wxWindowMac* wxpeer, return c; } -int wxListBox::DoListHitTest(const wxPoint& inpoint) const +int wxListBox::DoListHitTest(const wxPoint& WXUNUSED(inpoint)) const { #if wxOSX_USE_CARBON OSStatus err; diff --git a/src/osx/cocoa/menu.mm b/src/osx/cocoa/menu.mm index 628f38ecfb..cce72f4260 100644 --- a/src/osx/cocoa/menu.mm +++ b/src/osx/cocoa/menu.mm @@ -156,7 +156,7 @@ public : [NSApp setAppleMenu:[[m_osxMenu itemAtIndex:0] submenu]]; } - virtual void Enable( bool enable ) + virtual void Enable( bool WXUNUSED(enable) ) { } diff --git a/src/osx/cocoa/menuitem.mm b/src/osx/cocoa/menuitem.mm index 8b34b63bf3..b8f33fc0cc 100644 --- a/src/osx/cocoa/menuitem.mm +++ b/src/osx/cocoa/menuitem.mm @@ -32,6 +32,7 @@ - (void) clickedAction: (id) sender { + wxUnusedVar(sender); if ( impl ) { impl->GetWXPeer()->GetMenu()->HandleCommandProcess(impl->GetWXPeer()); @@ -40,6 +41,7 @@ - (BOOL)validateMenuItem:(NSMenuItem *) menuItem { + wxUnusedVar(menuItem); if( impl ) { impl->GetWXPeer()->GetMenu()->HandleCommandUpdateStatus(impl->GetWXPeer()); @@ -225,10 +227,10 @@ wxMenuItemCocoaImpl::~wxMenuItemCocoaImpl() wxMenuItemImpl* wxMenuItemImpl::Create( wxMenuItem* peer, wxMenu *pParentMenu, - int id, + int WXUNUSED(id), const wxString& text, wxAcceleratorEntry *entry, - const wxString& strHelp, + const wxString& WXUNUSED(strHelp), wxItemKind kind, wxMenu *pSubMenu ) { diff --git a/src/osx/cocoa/notebook.mm b/src/osx/cocoa/notebook.mm index 36abc047db..05bce718e8 100644 --- a/src/osx/cocoa/notebook.mm +++ b/src/osx/cocoa/notebook.mm @@ -55,6 +55,7 @@ - (BOOL)tabView:(NSTabView *)tabView shouldSelectTabViewItem:(NSTabViewItem *)tabViewItem { + wxUnusedVar(tabViewItem); wxNSTabView* view = (wxNSTabView*) tabView; wxWidgetCocoaImpl* viewimpl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( view ); @@ -68,6 +69,7 @@ - (void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem; { + wxUnusedVar(tabViewItem); wxNSTabView* view = (wxNSTabView*) tabView; wxWidgetCocoaImpl* viewimpl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( view ); if ( viewimpl ) @@ -225,12 +227,12 @@ public: #endif */ wxWidgetImplType* wxWidgetImpl::CreateTabView( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), const wxPoint& pos, const wxSize& size, long style, - long extraStyle) + long WXUNUSED(extraStyle)) { static wxTabViewController* controller = NULL; diff --git a/src/osx/cocoa/radiobut.mm b/src/osx/cocoa/radiobut.mm index ff157674aa..195860144b 100644 --- a/src/osx/cocoa/radiobut.mm +++ b/src/osx/cocoa/radiobut.mm @@ -17,13 +17,13 @@ #include "wx/osx/private.h" wxWidgetImplType* wxWidgetImpl::CreateRadioButton( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, - const wxString& label, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), + const wxString& WXUNUSED(label), const wxPoint& pos, const wxSize& size, - long style, - long extraStyle) + long WXUNUSED(style), + long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSButton* v = [[wxNSButton alloc] initWithFrame:r]; diff --git a/src/osx/cocoa/scrolbar.mm b/src/osx/cocoa/scrolbar.mm index 3cac87abdf..0c154086e9 100644 --- a/src/osx/cocoa/scrolbar.mm +++ b/src/osx/cocoa/scrolbar.mm @@ -87,7 +87,7 @@ protected: // to thumbtrack and only after super mouseDown // returns we will call the thumbrelease -void wxOSXScrollBarCocoaImpl::controlAction( WXWidget slf, void *_cmd, void *sender) +void wxOSXScrollBarCocoaImpl::controlAction( WXWidget WXUNUSED(slf), void *WXUNUSED(_cmd), void *WXUNUSED(sender)) { wxEventType scrollEvent = wxEVT_NULL; switch ([(NSScroller*)m_osxView hitPart]) @@ -136,12 +136,12 @@ void wxOSXScrollBarCocoaImpl::mouseEvent(WX_NSEvent event, WXWidget slf, void *_ } wxWidgetImplType* wxWidgetImpl::CreateScrollBar( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), const wxPoint& pos, const wxSize& size, - long style, - long extraStyle) + long WXUNUSED(style), + long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSScroller* v = [[wxNSScroller alloc] initWithFrame:r]; diff --git a/src/osx/cocoa/slider.mm b/src/osx/cocoa/slider.mm index 6e31a40e43..90ea3f7274 100644 --- a/src/osx/cocoa/slider.mm +++ b/src/osx/cocoa/slider.mm @@ -57,7 +57,7 @@ public : // to thumbtrack and only after super mouseDown // returns we will call the thumbrelease -void wxSliderCocoaImpl::controlAction( WXWidget slf, void *_cmd, void *sender) +void wxSliderCocoaImpl::controlAction( WXWidget WXUNUSED(slf), void *WXUNUSED(_cmd), void *WXUNUSED(sender)) { wxWindow* wxpeer = (wxWindow*) GetWXPeer(); if ( wxpeer ) @@ -79,15 +79,15 @@ void wxSliderCocoaImpl::mouseEvent(WX_NSEvent event, WXWidget slf, void *_cmd) wxWidgetImplType* wxWidgetImpl::CreateSlider( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), wxInt32 value, wxInt32 minimum, wxInt32 maximum, const wxPoint& pos, const wxSize& size, long style, - long extraStyle) + long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSSlider* v = [[wxNSSlider alloc] initWithFrame:r]; diff --git a/src/osx/cocoa/spinbutt.mm b/src/osx/cocoa/spinbutt.mm index 35deb7a89a..6511abb5f4 100644 --- a/src/osx/cocoa/spinbutt.mm +++ b/src/osx/cocoa/spinbutt.mm @@ -66,7 +66,7 @@ void wxSpinButtonCocoaImpl::mouseEvent(WX_NSEvent event, WXWidget slf, void *_cm wxWidgetCocoaImpl::mouseEvent(event, slf, _cmd); } -void wxSpinButtonCocoaImpl::controlAction( WXWidget slf, void *_cmd, void *sender) +void wxSpinButtonCocoaImpl::controlAction( WXWidget WXUNUSED(slf), void *WXUNUSED(_cmd), void *WXUNUSED(sender)) { wxWindow* wxpeer = (wxWindow*) GetWXPeer(); if ( wxpeer ) @@ -94,15 +94,15 @@ void wxSpinButtonCocoaImpl::controlAction( WXWidget slf, void *_cmd, void *sende } wxWidgetImplType* wxWidgetImpl::CreateSpinButton( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), wxInt32 value, wxInt32 minimum, wxInt32 maximum, const wxPoint& pos, const wxSize& size, long style, - long extraStyle) + long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSStepper* v = [[wxNSStepper alloc] initWithFrame:r]; diff --git a/src/osx/cocoa/statbox.mm b/src/osx/cocoa/statbox.mm index 6c5bff4a67..c9dcb0cf58 100644 --- a/src/osx/cocoa/statbox.mm +++ b/src/osx/cocoa/statbox.mm @@ -31,13 +31,13 @@ @end wxWidgetImplType* wxWidgetImpl::CreateGroupBox( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, - const wxString& label, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), + const wxString& WXUNUSED(label), const wxPoint& pos, const wxSize& size, - long style, - long extraStyle) + long WXUNUSED(style), + long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSBox* v = [[wxNSBox alloc] initWithFrame:r]; diff --git a/src/osx/cocoa/statline.mm b/src/osx/cocoa/statline.mm index fdff4b0c27..d793adbe3f 100644 --- a/src/osx/cocoa/statline.mm +++ b/src/osx/cocoa/statline.mm @@ -34,12 +34,12 @@ #include "wx/osx/private.h" wxWidgetImplType* wxWidgetImpl::CreateStaticLine( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), const wxPoint& pos, const wxSize& size, - long style, - long extraStyle) + long WXUNUSED(style), + long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSBox* v = [[wxNSBox alloc] initWithFrame:r]; diff --git a/src/osx/cocoa/stattext.mm b/src/osx/cocoa/stattext.mm index 0ec3ff70c3..da93c8ac63 100644 --- a/src/osx/cocoa/stattext.mm +++ b/src/osx/cocoa/stattext.mm @@ -60,7 +60,7 @@ public: wxNSStaticTextView* v = (wxNSStaticTextView*)GetWXWidget(); wxWindow* wxpeer = GetWXPeer(); NSCell* cell = [v cell]; - wxCFStringRef text( title , wxpeer->GetFont().GetEncoding() ); + wxCFStringRef text( title , encoding ); NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init]; [paragraphStyle setLineBreakMode:m_lineBreak]; @@ -86,13 +86,13 @@ wxSize wxStaticText::DoGetBestSize() const } wxWidgetImplType* wxWidgetImpl::CreateStaticText( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, - const wxString& label, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), + const wxString& WXUNUSED(label), const wxPoint& pos, const wxSize& size, long style, - long extraStyle) + long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSStaticTextView* v = [[wxNSStaticTextView alloc] initWithFrame:r]; diff --git a/src/osx/cocoa/taskbar.mm b/src/osx/cocoa/taskbar.mm index 6c6b760274..f842ba2ccb 100644 --- a/src/osx/cocoa/taskbar.mm +++ b/src/osx/cocoa/taskbar.mm @@ -231,7 +231,7 @@ WX_NSMenu wxTaskBarIconDockImpl::CocoaDoGetDockNSMenu() return (WX_NSMenu)dockMenu->GetHMenu(); } -bool wxTaskBarIconDockImpl::SetIcon(const wxIcon& icon, const wxString& tooltip) +bool wxTaskBarIconDockImpl::SetIcon(const wxIcon& WXUNUSED(icon), const wxString& WXUNUSED(tooltip)) { wxMacAutoreleasePool pool; m_originalDockIcon = [[[NSApplication sharedApplication] applicationIconImage] retain]; @@ -246,7 +246,7 @@ bool wxTaskBarIconDockImpl::RemoveIcon() return true; } -bool wxTaskBarIconDockImpl::PopupMenu(wxMenu *menu) +bool wxTaskBarIconDockImpl::PopupMenu(wxMenu *WXUNUSED(menu)) { wxFAIL_MSG(wxT("You cannot force the Dock icon menu to popup")); return false; @@ -266,7 +266,7 @@ wxTaskBarIconCustomStatusItemImpl::~wxTaskBarIconCustomStatusItemImpl() { } -bool wxTaskBarIconCustomStatusItemImpl::SetIcon(const wxIcon& icon, const wxString& tooltip) +bool wxTaskBarIconCustomStatusItemImpl::SetIcon(const wxIcon& icon, const wxString& WXUNUSED(tooltip)) { wxMacAutoreleasePool pool; if(!m_cocoaNSStatusItem) @@ -359,7 +359,7 @@ void wxTaskBarIconWindowCustom::OnMouseEvent(wxMouseEvent &event) m_taskBarIconImpl->GetTaskBarIcon()->ProcessEvent(tbiEvent); } -void wxTaskBarIconWindowCustom::OnPaint(wxPaintEvent &event) +void wxTaskBarIconWindowCustom::OnPaint(wxPaintEvent &WXUNUSED(event)) { wxPaintDC dc(this); // FIXME: This is a temporary hack until we can see real icons diff --git a/src/osx/cocoa/tglbtn.mm b/src/osx/cocoa/tglbtn.mm index 2e3aba3826..a3002b3d94 100644 --- a/src/osx/cocoa/tglbtn.mm +++ b/src/osx/cocoa/tglbtn.mm @@ -26,13 +26,13 @@ #include "wx/osx/private.h" wxWidgetImplType* wxWidgetImpl::CreateToggleButton( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, - const wxString& label, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), + const wxString& WXUNUSED(label), const wxPoint& pos, const wxSize& size, - long style, - long extraStyle) + long WXUNUSED(style), + long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSButton* v = [[wxNSButton alloc] initWithFrame:r]; @@ -44,13 +44,13 @@ wxWidgetImplType* wxWidgetImpl::CreateToggleButton( wxWindowMac* wxpeer, } wxWidgetImplType* wxWidgetImpl::CreateBitmapToggleButton( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, - const wxBitmap& label, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), + const wxBitmap& WXUNUSED(label), const wxPoint& pos, const wxSize& size, - long style, - long extraStyle) + long WXUNUSED(style), + long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSButton* v = [[wxNSButton alloc] initWithFrame:r]; diff --git a/src/osx/cocoa/toolbar.mm b/src/osx/cocoa/toolbar.mm index b93b614850..a03be42b46 100644 --- a/src/osx/cocoa/toolbar.mm +++ b/src/osx/cocoa/toolbar.mm @@ -315,6 +315,7 @@ private: - (void) clickedAction: (id) sender { + wxUnusedVar(sender); if ( impl ) { impl->Action(); @@ -337,21 +338,25 @@ private: - (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar*)toolbar { + wxUnusedVar(toolbar); return nil; } - (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar*)toolbar { + wxUnusedVar(toolbar); return nil; } - (NSArray *)toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar { + wxUnusedVar(toolbar); return nil; } - (NSToolbarItem*) toolbar:(NSToolbar*) toolbar itemForItemIdentifier:(NSString*) itemIdentifier willBeInsertedIntoToolbar:(BOOL) flag { + wxUnusedVar(toolbar); #ifdef __LP64__ wxToolBarTool* tool = (wxToolBarTool*) [itemIdentifier longLongValue]; #else @@ -393,6 +398,7 @@ private: - (void) clickedAction: (id) sender { + wxUnusedVar(sender); if ( impl ) { impl->Action(); @@ -699,7 +705,7 @@ void wxToolBar::DoGetSize( int *width, int *height ) const { WXWindow tlw = MacGetTopLevelWindowRef(); float toolbarHeight = 0.0; - NSRect windowFrame; + NSRect windowFrame = NSMakeRect(0, 0, 0, 0); if(m_macToolbar && [(NSToolbar*)m_macToolbar isVisible]) { diff --git a/src/osx/cocoa/tooltip.mm b/src/osx/cocoa/tooltip.mm index f2f0bd30f0..16ecda0f5b 100644 --- a/src/osx/cocoa/tooltip.mm +++ b/src/osx/cocoa/tooltip.mm @@ -54,11 +54,11 @@ void wxToolTip::SetWindow( wxWindow *win ) m_window = win ; } -void wxToolTip::Enable( bool flag ) +void wxToolTip::Enable( bool WXUNUSED(flag) ) { } -void wxToolTip::SetDelay( long msecs ) +void wxToolTip::SetDelay( long WXUNUSED(msecs) ) { } @@ -70,7 +70,7 @@ void wxToolTip::SetReshow( long WXUNUSED(msecs) ) { } -void wxToolTip::RelayEvent( wxWindow *win , wxMouseEvent &event ) +void wxToolTip::RelayEvent( wxWindow *WXUNUSED(win) , wxMouseEvent &WXUNUSED(event) ) { } @@ -79,7 +79,7 @@ void wxToolTip::RemoveToolTips() } // --- mac specific -void wxToolTip::NotifyWindowDelete( WXHWND win ) +void wxToolTip::NotifyWindowDelete( WXHWND WXUNUSED(win) ) { } diff --git a/src/osx/cocoa/utils.mm b/src/osx/cocoa/utils.mm index a33ccd1098..b8aa14190b 100644 --- a/src/osx/cocoa/utils.mm +++ b/src/osx/cocoa/utils.mm @@ -76,12 +76,14 @@ void wxMacWakeUp() - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { + wxUnusedVar(sender); // let wx do this, not cocoa return NO; } - (BOOL)application:(NSApplication *)sender openFile:(NSString *)filename; { + wxUnusedVar(sender); wxCFStringRef cf(wxCFRetain(filename)); wxTheApp->MacOpenFile(cf.AsString()) ; return YES; @@ -89,12 +91,14 @@ void wxMacWakeUp() - (BOOL)applicationShouldOpenUntitledFile:(NSApplication *)sender; { + wxUnusedVar(sender); wxTheApp->MacNewFile() ; return NO; } - (BOOL)application:(NSApplication *)sender printFile:(NSString *)filename { + wxUnusedVar(sender); wxCFStringRef cf(wxCFRetain(filename)); wxTheApp->MacPrintFile(cf.AsString()) ; return YES; @@ -109,6 +113,7 @@ void wxMacWakeUp() */ - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender { + wxUnusedVar(sender); wxWindow* win = wxTheApp->GetTopWindow() ; if ( win ) { @@ -125,6 +130,8 @@ void wxMacWakeUp() - (BOOL)applicationShouldHandleReopen:(NSApplication *)sender hasVisibleWindows:(BOOL)flag { + wxUnusedVar(flag); + wxUnusedVar(sender); wxTheApp->MacReopenApp() ; return NO; } @@ -132,6 +139,7 @@ void wxMacWakeUp() - (void)handleGetURLEvent:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent { + wxUnusedVar(replyEvent); NSString* url = [[event descriptorAtIndex:1] stringValue]; wxCFStringRef cf(wxCFRetain(url)); wxTheApp->MacOpenURL(cf.AsString()) ; @@ -171,6 +179,7 @@ void wxMacWakeUp() - (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo { + wxUnusedVar(contextInfo); resultCode = returnCode; sheetFinished = YES; // NSAlerts don't need nor respond to orderOut @@ -268,14 +277,6 @@ bool wxIsBusy() return (gs_wxBusyCursorCount > 0); } -void wxMacGlobalToLocal( WindowRef window , Point*pt ) -{ -} - -void wxMacLocalToGlobal( WindowRef window , Point*pt ) -{ -} - wxBitmap wxWindowDCImpl::DoGetAsBitmap(const wxRect *subrect) const { // wxScreenDC is derived from wxWindowDC, so a screen dc will diff --git a/src/osx/cocoa/window.mm b/src/osx/cocoa/window.mm index 822bf528c7..88eb273c59 100644 --- a/src/osx/cocoa/window.mm +++ b/src/osx/cocoa/window.mm @@ -609,7 +609,7 @@ void wxOSX_controlDoubleAction(NSView* self, SEL _cmd, id sender) impl->controlDoubleAction(self, _cmd, sender); } -unsigned int wxWidgetCocoaImpl::draggingEntered(void* s, WXWidget slf, void *_cmd) +unsigned int wxWidgetCocoaImpl::draggingEntered(void* s, WXWidget WXUNUSED(slf), void *WXUNUSED(_cmd)) { id sender = (id ) s; NSPasteboard *pboard = [sender draggingPasteboard]; @@ -654,7 +654,7 @@ unsigned int wxWidgetCocoaImpl::draggingEntered(void* s, WXWidget slf, void *_cm return nsresult; } -void wxWidgetCocoaImpl::draggingExited(void* s, WXWidget slf, void *_cmd) +void wxWidgetCocoaImpl::draggingExited(void* s, WXWidget WXUNUSED(slf), void *WXUNUSED(_cmd)) { id sender = (id ) s; NSPasteboard *pboard = [sender draggingPasteboard]; @@ -674,7 +674,7 @@ void wxWidgetCocoaImpl::draggingExited(void* s, WXWidget slf, void *_cmd) CFRelease(pboardRef); } -unsigned int wxWidgetCocoaImpl::draggingUpdated(void* s, WXWidget slf, void *_cmd) +unsigned int wxWidgetCocoaImpl::draggingUpdated(void* s, WXWidget WXUNUSED(slf), void *WXUNUSED(_cmd)) { id sender = (id ) s; NSPasteboard *pboard = [sender draggingPasteboard]; @@ -719,7 +719,7 @@ unsigned int wxWidgetCocoaImpl::draggingUpdated(void* s, WXWidget slf, void *_cm return nsresult; } -bool wxWidgetCocoaImpl::performDragOperation(void* s, WXWidget slf, void *_cmd) +bool wxWidgetCocoaImpl::performDragOperation(void* s, WXWidget WXUNUSED(slf), void *WXUNUSED(_cmd)) { id sender = (id ) s; @@ -844,7 +844,7 @@ void wxWidgetCocoaImpl::resetCursorRects(WXWidget slf, void *_cmd) } } -bool wxWidgetCocoaImpl::isFlipped(WXWidget slf, void *_cmd) +bool wxWidgetCocoaImpl::isFlipped(WXWidget WXUNUSED(slf), void *WXUNUSED(_cmd)) { return m_isFlipped; } @@ -852,7 +852,7 @@ bool wxWidgetCocoaImpl::isFlipped(WXWidget slf, void *_cmd) #define OSX_DEBUG_DRAWING 0 -void wxWidgetCocoaImpl::drawRect(void* rect, WXWidget slf, void *_cmd) +void wxWidgetCocoaImpl::drawRect(void* rect, WXWidget slf, void *WXUNUSED(_cmd)) { CGContextRef context = (CGContextRef) [[NSGraphicsContext currentContext] graphicsPort]; CGContextSaveGState( context ); @@ -911,14 +911,14 @@ void wxWidgetCocoaImpl::drawRect(void* rect, WXWidget slf, void *_cmd) CGContextRestoreGState( context ); } -void wxWidgetCocoaImpl::controlAction( WXWidget slf, void *_cmd, void *sender) +void wxWidgetCocoaImpl::controlAction( WXWidget WXUNUSED(slf), void *WXUNUSED(_cmd), void *WXUNUSED(sender)) { wxWindow* wxpeer = (wxWindow*) GetWXPeer(); if ( wxpeer ) wxpeer->OSXHandleClicked(0); } -void wxWidgetCocoaImpl::controlDoubleAction( WXWidget slf, void *_cmd, void *sender) +void wxWidgetCocoaImpl::controlDoubleAction( WXWidget WXUNUSED(slf), void *WXUNUSED(_cmd), void *WXUNUSED(sender)) { } @@ -1059,7 +1059,7 @@ void wxWidgetCocoaImpl::Lower() { } -void wxWidgetCocoaImpl::ScrollRect( const wxRect *rect, int dx, int dy ) +void wxWidgetCocoaImpl::ScrollRect( const wxRect *WXUNUSED(rect), int WXUNUSED(dx), int WXUNUSED(dy) ) { #if 1 SetNeedsDisplay() ; @@ -1197,12 +1197,12 @@ void wxWidgetCocoaImpl::SetLabel( const wxString& title, wxFontEncoding encoding { if ( [m_osxView respondsToSelector:@selector(setTitle:) ] ) { - wxCFStringRef cf( title , m_wxPeer->GetFont().GetEncoding() ); + wxCFStringRef cf( title , encoding ); [m_osxView setTitle:cf.AsNSString()]; } else if ( [m_osxView respondsToSelector:@selector(setStringValue:) ] ) { - wxCFStringRef cf( title , m_wxPeer->GetFont().GetEncoding() ); + wxCFStringRef cf( title , encoding ); [m_osxView setStringValue:cf.AsNSString()]; } } @@ -1278,7 +1278,7 @@ void wxWidgetCocoaImpl::SetBitmap( const wxBitmap& bitmap ) } } -void wxWidgetCocoaImpl::SetupTabs( const wxNotebook& notebook) +void wxWidgetCocoaImpl::SetupTabs( const wxNotebook& WXUNUSED(notebook)) { // implementation in subclass } @@ -1315,7 +1315,7 @@ void wxWidgetCocoaImpl::PulseGauge() { } -void wxWidgetCocoaImpl::SetScrollThumb( wxInt32 val, wxInt32 view ) +void wxWidgetCocoaImpl::SetScrollThumb( wxInt32 WXUNUSED(val), wxInt32 WXUNUSED(view) ) { } @@ -1485,8 +1485,9 @@ void wxWidgetCocoaImpl::SetFlipped(bool flipped) // Factory methods // -wxWidgetImpl* wxWidgetImpl::CreateUserPane( wxWindowMac* wxpeer, wxWindowMac* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - long style, long extraStyle) +wxWidgetImpl* wxWidgetImpl::CreateUserPane( wxWindowMac* wxpeer, wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), const wxPoint& pos, const wxSize& size, + long WXUNUSED(style), long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSView* v = [[wxNSView alloc] initWithFrame:r]; -- 2.45.2