aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-09-28 22:52:15 +0200
committertomaka <pierre.krieger1708@gmail.com>2015-09-28 22:52:15 +0200
commitd67248ee2a85b1fd7d2a38a9d94883a25a1be1a6 (patch)
tree9f7040ca1718d0e77e0810db4873cee369067497 /examples
parent3e11e5ef69cc714c067dff49834f0e782c8f7fc6 (diff)
parent77b37431173a7267835f01915f7bc604d9f5a6ff (diff)
downloadglutin-d67248ee2a85b1fd7d2a38a9d94883a25a1be1a6.tar.gz
glutin-d67248ee2a85b1fd7d2a38a9d94883a25a1be1a6.zip
Merge pull request #622 from jdm/warnings
Warning fixes for OS X.
Diffstat (limited to 'examples')
-rw-r--r--examples/fullscreen.rs4
-rw-r--r--examples/grabbing.rs4
-rw-r--r--examples/multiwindow.rs4
-rw-r--r--examples/support/mod.rs2
-rw-r--r--examples/transparent.rs4
-rw-r--r--examples/window.rs4
6 files changed, 10 insertions, 12 deletions
diff --git a/examples/fullscreen.rs b/examples/fullscreen.rs
index de4c449..305829d 100644
--- a/examples/fullscreen.rs
+++ b/examples/fullscreen.rs
@@ -40,14 +40,14 @@ fn main() {
.build()
.unwrap();
- unsafe { window.make_current() };
+ let _ = unsafe { window.make_current() };
let context = support::load(&window);
for event in window.wait_events() {
context.draw_frame((0.0, 1.0, 0.0, 1.0));
- window.swap_buffers();
+ let _ = window.swap_buffers();
println!("{:?}", event);
diff --git a/examples/grabbing.rs b/examples/grabbing.rs
index 0572686..f6cef73 100644
--- a/examples/grabbing.rs
+++ b/examples/grabbing.rs
@@ -18,7 +18,7 @@ fn main() { println!("This example requires glutin to be compiled with the `wind
fn main() {
let window = glutin::WindowBuilder::new().build().unwrap();
window.set_title("glutin - Cursor grabbing test");
- unsafe { window.make_current() };
+ let _ = unsafe { window.make_current() };
let context = support::load(&window);
let mut grabbed = false;
@@ -45,7 +45,7 @@ fn main() {
}
context.draw_frame((0.0, 1.0, 0.0, 1.0));
- window.swap_buffers();
+ let _ = window.swap_buffers();
}
}
diff --git a/examples/multiwindow.rs b/examples/multiwindow.rs
index 18299f8..acb2e99 100644
--- a/examples/multiwindow.rs
+++ b/examples/multiwindow.rs
@@ -39,13 +39,13 @@ fn main() {
#[cfg(feature = "window")]
fn run(window: glutin::Window, color: (f32, f32, f32, f32)) {
- unsafe { window.make_current() };
+ let _ = unsafe { window.make_current() };
let context = support::load(&window);
for event in window.wait_events() {
context.draw_frame(color);
- window.swap_buffers();
+ let _ = window.swap_buffers();
match event {
glutin::Event::Closed => break,
diff --git a/examples/support/mod.rs b/examples/support/mod.rs
index ab8e2a1..f05e425 100644
--- a/examples/support/mod.rs
+++ b/examples/support/mod.rs
@@ -69,8 +69,6 @@ pub fn load(window: &glutin::Window) -> Context {
impl Context {
pub fn draw_frame(&self, color: (f32, f32, f32, f32)) {
- use std::mem;
-
unsafe {
self.gl.ClearColor(color.0, color.1, color.2, color.3);
self.gl.Clear(gl::COLOR_BUFFER_BIT);
diff --git a/examples/transparent.rs b/examples/transparent.rs
index 7635b3f..9392d38 100644
--- a/examples/transparent.rs
+++ b/examples/transparent.rs
@@ -24,7 +24,7 @@ fn main() {
.build().unwrap();
window.set_title("A fantastic window!");
window.set_window_resize_callback(Some(resize_callback as fn(u32, u32)));
- unsafe { window.make_current() };
+ let _ = unsafe { window.make_current() };
println!("Pixel format of the window: {:?}", window.get_pixel_format());
@@ -32,7 +32,7 @@ fn main() {
for event in window.wait_events() {
context.draw_frame((0.0, 0.0, 0.0, 0.0));
- window.swap_buffers();
+ let _ = window.swap_buffers();
println!("{:?}", event);
diff --git a/examples/window.rs b/examples/window.rs
index 8204b95..8f378f0 100644
--- a/examples/window.rs
+++ b/examples/window.rs
@@ -22,7 +22,7 @@ fn main() {
let mut window = glutin::WindowBuilder::new().build().unwrap();
window.set_title("A fantastic window!");
window.set_window_resize_callback(Some(resize_callback as fn(u32, u32)));
- unsafe { window.make_current() };
+ let _ = unsafe { window.make_current() };
println!("Pixel format of the window: {:?}", window.get_pixel_format());
@@ -30,7 +30,7 @@ fn main() {
for event in window.wait_events() {
context.draw_frame((0.0, 1.0, 0.0, 1.0));
- window.swap_buffers();
+ let _ = window.swap_buffers();
println!("{:?}", event);