mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-01 14:20:05 -04:00
Fix warnings on linux (#879)
This commit is contained in:
@@ -6,7 +6,7 @@ use std::os::raw::{c_void, c_char, c_int};
|
|||||||
pub const RTLD_LAZY: c_int = 0x001;
|
pub const RTLD_LAZY: c_int = 0x001;
|
||||||
pub const RTLD_NOW: c_int = 0x002;
|
pub const RTLD_NOW: c_int = 0x002;
|
||||||
|
|
||||||
#[link="dl"]
|
#[link(name = "dl")]
|
||||||
extern {
|
extern {
|
||||||
pub fn dlopen(filename: *const c_char, flag: c_int) -> *mut c_void;
|
pub fn dlopen(filename: *const c_char, flag: c_int) -> *mut c_void;
|
||||||
pub fn dlerror() -> *mut c_char;
|
pub fn dlerror() -> *mut c_char;
|
||||||
|
|||||||
@@ -16,21 +16,9 @@ mod window;
|
|||||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
pub struct DeviceId;
|
pub struct DeviceId;
|
||||||
|
|
||||||
impl DeviceId {
|
|
||||||
pub unsafe fn dummy() -> Self {
|
|
||||||
DeviceId
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
pub struct WindowId(usize);
|
pub struct WindowId(usize);
|
||||||
|
|
||||||
impl WindowId {
|
|
||||||
pub unsafe fn dummy() -> Self {
|
|
||||||
WindowId(0)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn make_wid(s: &Proxy<wl_surface::WlSurface>) -> WindowId {
|
fn make_wid(s: &Proxy<wl_surface::WlSurface>) -> WindowId {
|
||||||
WindowId(s.c_ptr() as usize)
|
WindowId(s.c_ptr() as usize)
|
||||||
|
|||||||
Reference in New Issue
Block a user