Skip to content

Commit 6a5fe33

Browse files
committed
Fix some compilation warnings with rustc 1.34.0
1 parent 51a748c commit 6a5fe33

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/framebuffer/render_buffer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ impl RenderBufferAny {
432432
/// Determines the number of depth and stencil bits in the format of this render buffer.
433433
pub fn get_depth_stencil_bits(&self) -> (u16, u16) {
434434
unsafe {
435-
let mut ctxt = self.context.make_current();
435+
let ctxt = self.context.make_current();
436436
let mut depth_bits: gl::types::GLint = mem::uninitialized();
437437
let mut stencil_bits: gl::types::GLint = mem::uninitialized();
438438
ctxt.gl.BindRenderbuffer(gl::RENDERBUFFER, self.id);

src/texture/any.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ use std::borrow::Cow;
3535
use std::cell::Cell;
3636
use std::rc::Rc;
3737
use std::ops::Range;
38+
use std::ffi::c_void;
3839

3940
use ops;
4041
use fbo;
@@ -202,7 +203,7 @@ pub fn new_texture<'a, F: ?Sized, P>(facade: &F, format: TextureFormatRequest,
202203
let has_mipmaps = texture_levels > 1;
203204
let data = data;
204205
let data_raw = if let Some((_, ref data)) = data {
205-
data.as_ptr() as *const _
206+
data.as_ptr() as *const c_void
206207
} else {
207208
ptr::null()
208209
};
@@ -651,7 +652,7 @@ impl TextureAny {
651652
/// Determines the number of depth and stencil bits in the format of this texture.
652653
pub fn get_depth_stencil_bits(&self) -> (u16, u16) {
653654
unsafe {
654-
let mut ctxt = self.context.make_current();
655+
let ctxt = self.context.make_current();
655656
let mut depth_bits: gl::types::GLint = mem::uninitialized();
656657
let mut stencil_bits: gl::types::GLint = mem::uninitialized();
657658
// FIXME: GL version considerations

0 commit comments

Comments
 (0)