silence transmute warning lints

This commit is contained in:
auronandace
2026-03-17 08:11:42 +00:00
parent e6f6e7078d
commit 01ea72ecc7
3 changed files with 4 additions and 0 deletions
+1
View File
@@ -77,6 +77,7 @@ macro_rules! assert_equal_size(
// Fail at compile-time if alignments differ.
let a = [0_u8; core::mem::align_of::<$export>()];
#[allow(clippy::useless_transmute)]
let b: [u8; core::mem::align_of::<Wrapped>()] = core::mem::transmute(a);
};
// TODO: Turn into a macro?
+1
View File
@@ -343,6 +343,7 @@ pub unsafe extern "C" fn scandir(
(*namelist).cast::<c_void>(),
len as size_t,
mem::size_of::<*mut dirent>(),
#[allow(clippy::missing_transmute_annotations)] // too verbose
mem::transmute(compare),
)
};
+2
View File
@@ -296,6 +296,7 @@ pub unsafe extern "C" fn sighold(sig: c_int) -> c_int {
/// Present in issue 7. Removed in issue 8.
///
/// Use of this function is unspecified in a multi-threaded process.
#[allow(clippy::missing_transmute_annotations)]
#[unsafe(no_mangle)]
pub extern "C" fn sigignore(sig: c_int) -> c_int {
let mut psa = mem::MaybeUninit::<sigaction>::uninit();
@@ -342,6 +343,7 @@ pub unsafe extern "C" fn sigismember(set: *const sigset_t, signo: c_int) -> c_in
}
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/signal.html>.
#[allow(clippy::missing_transmute_annotations)]
#[unsafe(no_mangle)]
pub extern "C" fn signal(
sig: c_int,