From 77b37431173a7267835f01915f7bc604d9f5a6ff Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Mon, 28 Sep 2015 12:19:36 -0400 Subject: Warning fixes for OS X. --- src/api/cocoa/headless.rs | 4 ++-- src/api/cocoa/mod.rs | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src/api') diff --git a/src/api/cocoa/headless.rs b/src/api/cocoa/headless.rs index eb1a06f..49b8bc3 100644 --- a/src/api/cocoa/headless.rs +++ b/src/api/cocoa/headless.rs @@ -28,8 +28,8 @@ pub struct HeadlessContext { } impl HeadlessContext { - pub fn new((width, height): (u32, u32), pf_reqs: &PixelFormatRequirements, - opengl: &GlAttributes<&HeadlessContext>) -> Result + pub fn new((width, height): (u32, u32), _pf_reqs: &PixelFormatRequirements, + _opengl: &GlAttributes<&HeadlessContext>) -> Result { let context = unsafe { let attributes = [ diff --git a/src/api/cocoa/mod.rs b/src/api/cocoa/mod.rs index ecaca69..5a2f004 100644 --- a/src/api/cocoa/mod.rs +++ b/src/api/cocoa/mod.rs @@ -6,7 +6,6 @@ use {CreationError, Event, MouseCursor, CursorState}; use CreationError::OsError; use libc; -use Api; use ContextError; use GlAttributes; use GlContext; @@ -21,9 +20,7 @@ use native_monitor::NativeMonitorId; use objc::runtime::{Class, Object, Sel, BOOL, YES, NO}; use objc::declare::ClassDecl; -use cgl; use cgl::{CGLEnable, kCGLCECrashOnRemovedFunctions, CGLSetParameter, kCGLCPSurfaceOpacity}; -use cgl::CGLContextObj as CGL_CGLContextObj; use cocoa::base::{id, nil}; use cocoa::foundation::{NSAutoreleasePool, NSDate, NSDefaultRunLoopMode, NSPoint, NSRect, NSSize, @@ -758,7 +755,7 @@ impl Window { } #[inline] - pub fn set_cursor_position(&self, x: i32, y: i32) -> Result<(), ()> { + pub fn set_cursor_position(&self, _x: i32, _y: i32) -> Result<(), ()> { unimplemented!(); } } @@ -820,6 +817,7 @@ impl IdRef { IdRef(i) } + #[allow(dead_code)] fn retain(i: id) -> IdRef { if i != nil { let _: id = unsafe { msg_send![i, retain] }; @@ -856,6 +854,7 @@ impl Clone for IdRef { } } +#[allow(non_snake_case)] unsafe fn NSEventToEvent(window: &Window, nsevent: id) -> Option { if nsevent == nil { return None; } -- cgit v1.2.3