From 3326fafa9049ac04419cabafc91851a228fc12a9 Mon Sep 17 00:00:00 2001 From: sourceturner <126549-sourceturner@users.noreply.gitlab.redox-os.org> Date: Sun, 18 Jan 2026 21:16:37 +0100 Subject: [PATCH] Use unsafe blocks in sys/select.h implementation --- src/header/sys_select/mod.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/header/sys_select/mod.rs b/src/header/sys_select/mod.rs index 8124f211a9..b97707586b 100644 --- a/src/header/sys_select/mod.rs +++ b/src/header/sys_select/mod.rs @@ -2,6 +2,9 @@ //! //! See . +// TODO: set this for entire crate when possible +#![deny(unsafe_op_in_unsafe_fn)] + use core::mem; use cbitset::BitSet; @@ -180,22 +183,22 @@ pub unsafe extern "C" fn select( if readfds.is_null() { None } else { - Some(&mut *readfds) + Some(unsafe { &mut *readfds }) }, if writefds.is_null() { None } else { - Some(&mut *writefds) + Some(unsafe { &mut *writefds }) }, if exceptfds.is_null() { None } else { - Some(&mut *exceptfds) + Some(unsafe { &mut *exceptfds }) }, if timeout.is_null() { None } else { - Some(&mut *timeout) + Some(unsafe { &mut *timeout }) } ), "select({}, {:p}, {:p}, {:p}, {:p})",