Skip to content

Commit 228809e

Browse files
authored
Fix a variety of warnings throughout the code (#359)
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
1 parent f4f807e commit 228809e

5 files changed

Lines changed: 6 additions & 7 deletions

File tree

examples/offscreen.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use crate::common::{ck, Buffer, FilesystemResourceLoader, Program, Shader, Shade
88
use clap::{App, Arg};
99
use euclid::default::Size2D;
1010
use gl;
11-
use gl::types::{GLchar, GLenum, GLint, GLuint, GLvoid};
11+
use gl::types::{GLenum, GLint, GLuint, GLvoid};
1212
use png::{BitDepth, ColorType, Encoder};
1313
use std::fs::File;
1414
use std::mem;

examples/threads.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use self::common::{ck, Buffer, Program, ResourceLoader, Shader, ShaderKind};
88

99
use euclid::default::{Point2D, Rect, Size2D, Vector2D};
10-
use gl::types::{GLchar, GLenum, GLint, GLuint, GLvoid};
10+
use gl::types::{GLenum, GLint, GLuint};
1111
use std::sync::mpsc::{self, Receiver, Sender};
1212
use std::thread;
1313
use surfman::{declare_surfman, SurfaceAccess, SurfaceTexture, SurfaceType};
@@ -122,7 +122,6 @@ fn main() {
122122
};
123123

124124
let event_loop = EventLoop::new().expect("couldn't create eventloop");
125-
let window_size = Size2D::new(WINDOW_WIDTH, WINDOW_HEIGHT);
126125
let physical_size = PhysicalSize::new(WINDOW_WIDTH, WINDOW_HEIGHT);
127126

128127
let window = WindowBuilder::new()

src/platform/macos/system/surface.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use objc2_io_surface::{
2828
kIOSurfaceBytesPerElement, kIOSurfaceBytesPerRow, kIOSurfaceCacheMode, kIOSurfaceHeight,
2929
kIOSurfacePixelFormat, kIOSurfaceWidth, IOSurfaceLockOptions, IOSurfaceRef,
3030
};
31-
use objc2_quartz_core::{kCAGravityTopLeft, CALayer, CATransaction, CATransform3D};
31+
use objc2_quartz_core::{CALayer, CATransaction, CATransform3D};
3232
use std::fmt::{self, Debug, Formatter};
3333
use std::mem;
3434
use std::os::raw::c_void;

src/platform/windows/wgl/context.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -663,10 +663,10 @@ fn extension_loader_thread() -> WGLExtensionFunctions {
663663
// a pointer to a null-terminated c string, or an `ATOM` / `u16` encoded
664664
// in the lower bytes of the pointer type. We do the latter by forcing an
665665
// `as` cast of the ATOM to the pointer type `LPCSTR`.
666-
let lpClassName = window_class_atom as LPCSTR;
666+
let lp_class_name = window_class_atom as LPCSTR;
667667
let window = winuser::CreateWindowExA(
668668
0,
669-
lpClassName,
669+
lp_class_name,
670670
window_class_name,
671671
WS_OVERLAPPEDWINDOW | WS_VISIBLE,
672672
0,

src/platform/windows/wgl/device.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ impl HiddenWindow {
299299
}
300300

301301
#[inline]
302-
pub(crate) fn get_dc(&self) -> DCGuard {
302+
pub(crate) fn get_dc(&self) -> DCGuard<'_> {
303303
unsafe { DCGuard::new(winuser::GetDC(self.window), Some(self.window)) }
304304
}
305305

0 commit comments

Comments
 (0)