Merge branch 'clippy-green5' into 'master'

work around triggering some clippy lints

See merge request redox-os/relibc!1554
This commit is contained in:
Jeremy Soller
2026-07-17 19:53:22 -06:00
3 changed files with 18 additions and 8 deletions
+7 -2
View File
@@ -98,11 +98,16 @@ pub unsafe fn poll_epoll(fds: &mut [pollfd], timeout: c_int, sigmask: *const sig
continue;
}
#[expect(clippy::needless_update)]
#[cfg(target_os = "redox")]
let mut event = epoll_event {
events: 0,
data: epoll_data { u64: i as u64 },
..Default::default()
};
#[cfg(target_os = "linux")]
let mut event = epoll_event {
events: 0,
data: epoll_data { u64: i as u64 },
..Default::default() // needed only on redox for _pad field
};
for (p, ep) in event_map.iter() {
+1 -2
View File
@@ -250,8 +250,7 @@ impl Pal for Sys {
}
fn exit(status: c_int) -> ! {
let _ = redox_rt::sys::posix_exit(status);
loop {}
redox_rt::sys::posix_exit(status)
}
unsafe fn execve(path: CStr, argv: *const *mut c_char, envp: *const *mut c_char) -> Result<()> {
+10 -4
View File
@@ -567,8 +567,11 @@ impl PalSocket for Sys {
// The maximum length of the address
maxlen,
// The first NUL byte, if any
// TODO triggers clippy::borrow_as_ptr, applying suggestion fails to compile
unsafe { strnlen(&data.sun_path as *const _, maxlen as size_t) },
// FIXME applying clippy suggestion fails to compile
#[expect(clippy::borrow_as_ptr)]
unsafe {
strnlen(&data.sun_path as *const _, maxlen as size_t)
},
);
let addr =
@@ -654,8 +657,11 @@ impl PalSocket for Sys {
// The maximum length of the address
maxlen,
// The first NUL byte, if any
// TODO triggers clippy::borrow_as_ptr, applying suggestion fails to compile
unsafe { strnlen(&data.sun_path as *const _, maxlen as size_t) },
// FIXME applying clippy suggestion fails to compile
#[expect(clippy::borrow_as_ptr)]
unsafe {
strnlen(&data.sun_path as *const _, maxlen as size_t)
},
);
let addr =