]> git.saurik.com Git - wxWidgets.git/commitdiff
fixing warning in osx core and carbon
authorStefan Csomor <csomor@advancedconcepts.ch>
Mon, 23 Mar 2009 15:24:04 +0000 (15:24 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Mon, 23 Mar 2009 15:24:04 +0000 (15:24 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/carbon/app.cpp
src/osx/carbon/combobox.cpp
src/osx/carbon/dnd.cpp
src/osx/carbon/font.cpp
src/osx/carbon/graphics.cpp
src/osx/carbon/mdi.cpp
src/osx/carbon/renderer.cpp
src/osx/carbon/statbrma.cpp
src/osx/carbon/utilscocoa.mm
src/osx/core/mimetype.cpp

index aca21781274c3a24f8fe9902c9e6c61264e98177..0ec20f24c4e385eac9dd6ea929b30aa0e06fbb18 100644 (file)
@@ -1516,6 +1516,15 @@ void wxApp::MacCreateKeyEvent( wxKeyEvent& event, wxWindow* focus , long keymess
     event.m_y = wherey;
     event.SetTimestamp(when);
     event.SetEventObject(focus);
+#else
+    wxUnusedVar(event);
+    wxUnusedVar(focus);
+    wxUnusedVar(keymessage);
+    wxUnusedVar(modifiers);
+    wxUnusedVar(when);
+    wxUnusedVar(wherex);
+    wxUnusedVar(wherey);
+    wxUnusedVar(uniChar);
 #endif
 }
 
index 6792bbf1ae12d59c5c61f317d1a63a141c93eb46..53b729485e8be4e7274973a2f6856ccc49ca0ef6 100644 (file)
@@ -659,7 +659,7 @@ bool wxComboBox::CanRedo() const
         return false;
 }
 
-bool wxComboBox::OSXHandleClicked( double timestampsec )
+bool wxComboBox::OSXHandleClicked( double WXUNUSED(timestampsec) )
 {
 /*
     For consistency with other platforms, clicking in the text area does not constitute a selection
index bc0f7e5485c6e1f408af1d0f6542a6cc2a565b34..1c06491e9a7cd93a03c7d3de7963467a84b30330 100644 (file)
@@ -302,6 +302,8 @@ wxDragResult wxDropSource::DoDragDrop(int flags)
     DisposeDrag( theDrag );
     CFRelease( pasteboard );
     gTrackingGlobals.m_currentSource = NULL;
+#else
+    wxUnusedVar(flags);
 #endif
 
     return gTrackingGlobals.m_result;
index de2fbe70243129f3dc2e87e08d46899c2c064d64..250fecd35a1325b2b29472476c3c6ee18d16ae09 100644 (file)
@@ -283,7 +283,7 @@ wxFontRefData::wxFontRefData(wxOSXSystemFont font, int size)
 #if wxOSX_USE_CORE_TEXT
     if (  UMAGetSystemVersion() >= 0x1050 )
     {
-        CTFontUIFontType uifont;
+        CTFontUIFontType uifont = kCTFontSystemFontType;
         switch( font )
         {
             case wxOSX_SYSTEM_FONT_NORMAL:
@@ -323,7 +323,7 @@ wxFontRefData::wxFontRefData(wxOSXSystemFont font, int size)
     {
 #if !wxOSX_USE_CARBON
         // not needed outside
-        ThemeFontID m_macThemeFontID;
+        ThemeFontID m_macThemeFontID = kThemeSystemFont;
 #endif
         switch( font )
         {
index 27a04247883acfa1a1514862c1f304c5e4ab83ad..e81a541cb53afe34139a170159b1c5fbbc603b4c 100644 (file)
@@ -1806,7 +1806,7 @@ bool wxMacCoreGraphicsContext::SetCompositionMode(wxCompositionMode op)
 void wxMacCoreGraphicsContext::BeginLayer(wxDouble opacity)
 {
     CGContextSaveGState(m_cgContext);
-    CGContextSetAlpha(m_cgContext, opacity);
+    CGContextSetAlpha(m_cgContext, (CGFloat) opacity);
     CGContextBeginTransparencyLayer(m_cgContext, 0);
 }
 
@@ -2179,7 +2179,7 @@ void wxMacCoreGraphicsContext::DoDrawText( const wxString &str, wxDouble x, wxDo
         y += CTFontGetAscent(font);
 
         CGContextSaveGState(m_cgContext);
-        CGContextTranslateCTM(m_cgContext, x, y);
+        CGContextTranslateCTM(m_cgContext, (CGFloat) x, (CGFloat) y);
         CGContextScaleCTM(m_cgContext, 1, -1);
         CGContextSetTextPosition(m_cgContext, 0, 0);
         CTLineDraw( line, m_cgContext );
@@ -2352,7 +2352,8 @@ void wxMacCoreGraphicsContext::GetTextExtent( const wxString &str, wxDouble *wid
         wxCFRef<CFAttributedStringRef> attrtext( CFAttributedStringCreate(kCFAllocatorDefault, text, attributes) );
         wxCFRef<CTLineRef> line( CTLineCreateWithAttributedString(attrtext) );
 
-        CGFloat w, a, d, l;
+        double w;
+        CGFloat a, d, l;
 
         w = CTLineGetTypographicBounds(line, &a, &d, &l) ;
 
@@ -2703,6 +2704,7 @@ wxGraphicsContext * wxMacCoreGraphicsRenderer::CreateContextFromNativeWindow( vo
 #if wxOSX_USE_CARBON
     return new wxMacCoreGraphicsContext(this,(WindowRef)window);
 #else
+    wxUnusedVar(window);
     return NULL;
 #endif
 }
index daf448f6ffc210b5847de16729f291341b5739e8..eb86566919eb47bcb1dc122ec68b9e2b71c42a8e 100644 (file)
@@ -71,6 +71,8 @@ void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate )
 #endif
     }
 #elif defined(wxOSX_USE_COCOA)
+    wxUnusedVar(inActivate);
+    wxUnusedVar(inWindowRef);
 // TODO: implement me!
 #endif
 }
index f8e770f4254746d2ccf853e718b52c2d7d2a0aac..49e9c1824498e7b717e687814d88c56b1f07c27e 100644 (file)
@@ -38,6 +38,7 @@
 // check if we're currently in a paint event
 inline bool wxInPaintEvent(wxWindow* win, wxDC& dc)
 {
+    wxUnusedVar(dc);
     return ( win->MacGetCGContextRef() != NULL );
 }
 
index a1f4cb28f6818e99ef2714e592ef36a3273e943d..3898d12d56fb57daa47b869fe161cd9fd4c0a5f7 100644 (file)
@@ -70,7 +70,7 @@ bool wxStatusBarMac::Create(wxWindow *parent, wxWindowID id,
     return true;
 }
 
-void wxStatusBarMac::DrawFieldText(wxDC& dc, const wxRect& rect, int i, int textHeight)
+void wxStatusBarMac::DrawFieldText(wxDC& dc, const wxRect& rect, int i, int WXUNUSED(textHeight))
 {
     int w, h;
     GetSize( &w , &h );
index bf7392e89239256ca1dfe6620ec62a90520b7da1..0b8eaa3618d5589daf0448345a7b4a4b499da792 100644 (file)
@@ -95,7 +95,7 @@ void* wxMacCocoaRetain( void* obj )
 
 WX_NSFont wxFont::CreateNSFont(wxOSXSystemFont font, wxNativeFontInfo* info)
 {
-    NSFont* nsfont;
+    NSFont* nsfont = nil;
     switch( font )
     {
         case wxOSX_SYSTEM_FONT_NORMAL:
index 59fd12a0db5c7620a0734a1740ab909259425f14..6bfd38a8b933aadf2f4d5268945cc2e24fe4db4a 100644 (file)
@@ -298,8 +298,8 @@ void wxMimeTypesManagerImpl::InitIfNeeded()
 
 
 // read system and user mailcaps and other files
-void wxMimeTypesManagerImpl::Initialize(int mailcapStyles,
-                                        const wxString& sExtraDir)
+void wxMimeTypesManagerImpl::Initialize(int WXUNUSED(mailcapStyles),
+                                        const wxString& WXUNUSED(sExtraDir))
 {
 #ifdef __VMS
     // XDG tables are never installed on OpenVMS