silence transmute warning lints
This commit is contained in:
@@ -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?
|
||||
|
||||
@@ -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),
|
||||
)
|
||||
};
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user