Suppress some warnings
This commit is contained in:
parent
924d718511
commit
c041104afd
2 changed files with 4 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#![cfg(not(feature = "no-asm"))]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use core::intrinsics;
|
||||
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ pub unsafe extern "C" fn bcmp(s1: *const u8, s2: *const u8, n: usize) -> i32 {
|
|||
}
|
||||
|
||||
// `bytes` must be a multiple of `mem::size_of::<T>()`
|
||||
#[cfg_attr(not(target_has_atomic_load_store = "8"), allow(dead_code))]
|
||||
fn memcpy_element_unordered_atomic<T: Copy>(dest: *mut T, src: *const T, bytes: usize) {
|
||||
unsafe {
|
||||
let n = exact_div(bytes, mem::size_of::<T>());
|
||||
|
|
@ -81,6 +82,7 @@ fn memcpy_element_unordered_atomic<T: Copy>(dest: *mut T, src: *const T, bytes:
|
|||
}
|
||||
|
||||
// `bytes` must be a multiple of `mem::size_of::<T>()`
|
||||
#[cfg_attr(not(target_has_atomic_load_store = "8"), allow(dead_code))]
|
||||
fn memmove_element_unordered_atomic<T: Copy>(dest: *mut T, src: *const T, bytes: usize) {
|
||||
unsafe {
|
||||
let n = exact_div(bytes, mem::size_of::<T>());
|
||||
|
|
@ -103,6 +105,7 @@ fn memmove_element_unordered_atomic<T: Copy>(dest: *mut T, src: *const T, bytes:
|
|||
}
|
||||
|
||||
// `T` must be a primitive integer type, and `bytes` must be a multiple of `mem::size_of::<T>()`
|
||||
#[cfg_attr(not(target_has_atomic_load_store = "8"), allow(dead_code))]
|
||||
fn memset_element_unordered_atomic<T>(s: *mut T, c: u8, bytes: usize)
|
||||
where
|
||||
T: Copy + From<u8> + Shl<u32, Output = T> + BitOr<T, Output = T>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue