diff options
author | Esption <esption@gmail.com> | 2015-05-08 12:31:56 -0500 |
---|---|---|
committer | Esption <esption@gmail.com> | 2015-05-08 12:31:56 -0500 |
commit | c973a1f83e2f9cea017e9dd48c4acaeb23fe5eb7 (patch) | |
tree | 64a7282c58e3ad6e7de4221b27840caeb857bd87 /src/api | |
parent | 0d10dda72a3d56ec137da0359b2f46fc75b7aaa9 (diff) | |
download | glutin-c973a1f83e2f9cea017e9dd48c4acaeb23fe5eb7.tar.gz glutin-c973a1f83e2f9cea017e9dd48c4acaeb23fe5eb7.zip |
Fixed build warnings
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/caca/ffi.rs | 4 | ||||
-rw-r--r-- | src/api/caca/mod.rs | 1 | ||||
-rw-r--r-- | src/api/dlopen.rs | 1 | ||||
-rw-r--r-- | src/api/egl/ffi.rs | 2 | ||||
-rw-r--r-- | src/api/egl/mod.rs | 7 | ||||
-rw-r--r-- | src/api/osmesa/mod.rs | 1 | ||||
-rw-r--r-- | src/api/wayland/mod.rs | 5 | ||||
-rw-r--r-- | src/api/x11/mod.rs | 2 |
8 files changed, 13 insertions, 10 deletions
diff --git a/src/api/caca/ffi.rs b/src/api/caca/ffi.rs index e0921ae..4a7b813 100644 --- a/src/api/caca/ffi.rs +++ b/src/api/caca/ffi.rs @@ -1,6 +1,6 @@ +#![allow(non_camel_case_types)] + use libc; -use std::ffi::CStr; -use std::mem; pub type caca_display_t = libc::c_void; pub type caca_canvas_t = libc::c_void; diff --git a/src/api/caca/mod.rs b/src/api/caca/mod.rs index 1e3840c..06a6931 100644 --- a/src/api/caca/mod.rs +++ b/src/api/caca/mod.rs @@ -1,4 +1,5 @@ #![cfg(any(target_os = "linux", target_os = "freebsd"))] +#![allow(unused_variables, dead_code)] use libc; use api::osmesa::{OsMesaContext, OsMesaCreationError}; diff --git a/src/api/dlopen.rs b/src/api/dlopen.rs index 63f690a..945dfb0 100644 --- a/src/api/dlopen.rs +++ b/src/api/dlopen.rs @@ -1,4 +1,5 @@ #![cfg(target_os = "linux")] +#![allow(dead_code)] use libc; diff --git a/src/api/egl/ffi.rs b/src/api/egl/ffi.rs index 5fa6384..6a81ada 100644 --- a/src/api/egl/ffi.rs +++ b/src/api/egl/ffi.rs @@ -1,3 +1,5 @@ +#![allow(non_camel_case_types)] + use libc; #[cfg(target_os = "windows")] diff --git a/src/api/egl/mod.rs b/src/api/egl/mod.rs index b2fe2c6..8f9ebcf 100644 --- a/src/api/egl/mod.rs +++ b/src/api/egl/mod.rs @@ -1,4 +1,5 @@ #![cfg(any(target_os = "linux", target_os = "android"))] +#![allow(unused_variables)] use BuilderAttribs; use CreationError; @@ -161,9 +162,7 @@ impl Context { impl GlContext for Context { unsafe fn make_current(&self) { - let ret = unsafe { - self.egl.MakeCurrent(self.display, self.surface, self.surface, self.context) - }; + let ret = self.egl.MakeCurrent(self.display, self.surface, self.surface, self.context); if ret == 0 { panic!("eglMakeCurrent failed"); @@ -206,8 +205,6 @@ unsafe impl Sync for Context {} impl Drop for Context { fn drop(&mut self) { - use std::ptr; - unsafe { // we don't call MakeCurrent(0, 0) because we are not sure that the context // is still the current one diff --git a/src/api/osmesa/mod.rs b/src/api/osmesa/mod.rs index 22df72a..26808f7 100644 --- a/src/api/osmesa/mod.rs +++ b/src/api/osmesa/mod.rs @@ -60,6 +60,7 @@ impl OsMesaContext { (self.width, self.height) } + #[allow(dead_code)] // TODO: can we remove this without causing havoc? pub fn set_window_resize_callback(&mut self, _: Option<fn(u32, u32)>) { } diff --git a/src/api/wayland/mod.rs b/src/api/wayland/mod.rs index d2ca990..31e9243 100644 --- a/src/api/wayland/mod.rs +++ b/src/api/wayland/mod.rs @@ -1,4 +1,5 @@ #![cfg(target_os = "linux")] +#![allow(unused_variables, dead_code)] use self::wayland::egl::{EGLSurface, is_egl_available}; use self::wayland::core::{Display, Registry, Compositor, Shell, ShellSurface, @@ -258,7 +259,7 @@ impl Window { wayland_context.register_surface(shell_surface.get_wsurface().get_id(), events.clone()); - wayland_context.display.flush(); + wayland_context.display.flush().unwrap(); Ok(Window { shell_surface: shell_surface, @@ -375,4 +376,4 @@ impl Drop for Window { ctxt.deregister_surface(self.shell_surface.get_wsurface().get_id()) } } -}
\ No newline at end of file +} diff --git a/src/api/x11/mod.rs b/src/api/x11/mod.rs index 4edfbbd..4efa11c 100644 --- a/src/api/x11/mod.rs +++ b/src/api/x11/mod.rs @@ -414,7 +414,7 @@ impl Window { }; // getting the visual infos - let mut visual_infos: ffi::glx::types::XVisualInfo = unsafe { + let visual_infos: ffi::glx::types::XVisualInfo = unsafe { let vi = glx.GetVisualFromFBConfig(display as *mut _, fb_config); if vi.is_null() { return Err(OsError(format!("glx::ChooseVisual failed"))); |