diff --git a/src/control/mod.rs b/src/control/mod.rs index 2b6f946..f998660 100644 --- a/src/control/mod.rs +++ b/src/control/mod.rs @@ -1129,6 +1129,7 @@ impl Iterator for Events { self.i += event.length as usize; match event.type_ { ffi::DRM_EVENT_VBLANK => { + #[allow(invalid_reference_casting)] let vblank_event = unsafe { &*(event as *const _ as *const ffi::drm_event_vblank) }; Some(Event::Vblank(VblankEvent { @@ -1143,6 +1144,7 @@ impl Iterator for Events { })) } ffi::DRM_EVENT_FLIP_COMPLETE => { + #[allow(invalid_reference_casting)] let vblank_event = unsafe { &*(event as *const _ as *const ffi::drm_event_vblank) }; Some(Event::PageFlip(PageFlipEvent {