190 |
#[inline]
|
191 |
#[allow(clippy::cast_ptr_alignment)]
|
192 |
pub fn put_atomic_i64(&self, offset: Index, val: i64) {
|
200 |
#[inline]
|
201 |
#[allow(clippy::cast_ptr_alignment)]
|
202 |
pub fn compare_and_set_i32(&self, position: Index, expected: i32, update: i32) -> bool {
|
212 |
#[inline]
|
213 |
#[allow(clippy::cast_ptr_alignment)]
|
214 |
pub fn compare_and_set_i64(&self, position: Index, expected: i64, update: i64) -> bool {
|
346 |
*/
|
347 |
#[allow(clippy::cast_ptr_alignment)]
|
348 |
pub fn get_and_add_i64(&self, offset: Index, delta: i64) -> i64 {
|
755 |
#[allow(unused_must_use)]
|
756 |
#[allow(clippy::cast_ptr_alignment)]
|
757 |
fn test_counters_store_meta_data() {
|
317 |
#[allow(dead_code)]
|
318 |
#[allow(clippy::cast_ptr_alignment)]
|
319 |
fn on_new_fragment_check_seq_no(buffer: &AtomicBuffer, offset: Index, length: Index, _header: &Header) {
|
10 |
/// AES cipher (encrypt) round function.
|
11 |
#[allow(clippy::cast_ptr_alignment)]
|
12 |
#[target_feature(enable = "aes")]
|
29 |
/// AES cipher (encrypt) round function: parallel version.
|
30 |
#[allow(clippy::cast_ptr_alignment)]
|
31 |
#[target_feature(enable = "aes")]
|
49 |
/// AES equivalent inverse cipher (decrypt) round function.
|
50 |
#[allow(clippy::cast_ptr_alignment)]
|
51 |
#[target_feature(enable = "aes")]
|
68 |
/// AES equivalent inverse cipher (decrypt) round function: parallel version.
|
69 |
#[allow(clippy::cast_ptr_alignment)]
|
70 |
#[target_feature(enable = "aes")]
|
88 |
/// AES mix columns function.
|
89 |
#[allow(clippy::cast_ptr_alignment)]
|
90 |
#[target_feature(enable = "aes")]
|
98 |
// the compiler's eyes.
|
99 |
#[allow(clippy::cast_ptr_alignment)]
|
100 |
{
|
141 |
assert_eq!(data.len(), 12);
|
142 |
#[allow(clippy::cast_ptr_alignment)]
|
143 |
let raw = data.as_ptr() as *const u32;
|
154 |
assert_eq!(data.len(), 12);
|
155 |
#[allow(clippy::cast_ptr_alignment)]
|
156 |
let raw = data.as_ptr() as *const u32;
|
33 |
pub unsafe fn unpack32(in_ptr: *const u8, out_ptr: *mut u32, num_bits: usize) -> *const u8 {
|
34 |
#[allow(clippy::cast_ptr_alignment)]
|
35 |
let in_ptr = in_ptr as *const u32;
|
41 |
let len_64 = (len / 8) * 8;
|
42 |
#[allow(clippy::cast_ptr_alignment)]
|
43 |
let data_bytes_64 = data_bytes.as_ptr() as *const u64;
|
104 |
#[allow(clippy::cast_ptr_alignment)]
|
105 |
let bytes_u32 = bytes.as_ptr() as *const u32;
|
224 |
// we set the pointer alignment above to be at least that of AtomicUsize
|
225 |
#[allow(clippy::cast_ptr_alignment)]
|
226 |
{
|
272 |
//
|
273 |
#[allow(clippy::cast_ptr_alignment)]
|
274 |
unsafe {
|
69 |
#[inline]
|
70 |
#[allow(clippy::cast_ptr_alignment)] // unaligned load
|
71 |
pub unsafe fn load(ptr: *const u8) -> Self {
|
77 |
#[inline]
|
78 |
#[allow(clippy::cast_ptr_alignment)]
|
79 |
pub unsafe fn load_aligned(ptr: *const u8) -> Self {
|
87 |
#[inline]
|
88 |
#[allow(clippy::cast_ptr_alignment)]
|
89 |
pub unsafe fn store_aligned(self, ptr: *mut u8) {
|
33 |
#[inline]
|
34 |
#[allow(clippy::cast_ptr_alignment)] // unaligned load
|
35 |
pub unsafe fn load(ptr: *const u8) -> Self {
|
41 |
#[inline]
|
42 |
#[allow(clippy::cast_ptr_alignment)]
|
43 |
pub unsafe fn load_aligned(ptr: *const u8) -> Self {
|
101 |
#[inline]
|
102 |
#[allow(clippy::cast_ptr_alignment)]
|
103 |
pub fn convert_mod_to_safe(self, ptr: *mut u8) -> Group {
|
739 |
// we assume that pointer is aligned for `i32`, as Utf8 uses `i32` offsets.
|
740 |
#[allow(clippy::cast_ptr_alignment)]
|
741 |
let offset_buffer = unsafe {
|
751 |
// we assume that pointer is aligned for `i64`, as Large uses `i64` offsets.
|
752 |
#[allow(clippy::cast_ptr_alignment)]
|
753 |
let offset_buffer = unsafe {
|
320 |
// cast to *const u64 should be fine since we are using read_unaligned below
|
321 |
#[allow(clippy::cast_ptr_alignment)]
|
322 |
let raw_data = self.buffer.as_ptr() as *const u64;
|
659 |
// ToDo: Work out allignment.
|
660 |
#[allow(clippy::cast_ptr_alignment)]
|
661 |
let vertex_base = unsafe {
|
668 |
.mapped_data as *mut ImDrawVert;
|
669 |
#[allow(clippy::cast_ptr_alignment)]
|
670 |
let index_base = unsafe {
|
79 |
#[allow(clippy::cast_possible_truncation, clippy::cast_ptr_alignment)]
|
80 |
pub(super) fn allocate(&mut self, string: &str) -> (&mut Entry, usize, usize) {
|
70 |
unsafe {
|
71 |
#[allow(clippy::cast_ptr_alignment)]
|
72 |
ptr::copy_nonoverlapping(bytes.as_ptr() as *const u64, &mut self.value, 1);
|
242 |
#[allow(clippy::cast_ptr_alignment)]
|
243 |
fn header(&self) -> &PacketHeader {
|
247 |
#[allow(clippy::cast_ptr_alignment)]
|
248 |
fn header_mut(&mut self) -> &mut PacketHeader {
|
99 |
/// and `BlockList`.
|
100 |
#[allow(clippy::cast_ptr_alignment)]
|
101 |
pub unsafe fn from_raw(
|
122 |
/// ```
|
123 |
#[allow(clippy::cast_ptr_alignment)]
|
124 |
pub fn weight(&self) -> u32 {
|
185 |
/// ```
|
186 |
#[allow(clippy::cast_ptr_alignment)]
|
187 |
pub fn distance(&self, other: &Self) -> u32 {
|
574 |
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
|
575 |
#[allow(clippy::cast_ptr_alignment)]
|
576 |
mod x86_arch {
|
42 |
/// implementation based on glibc (https://github.molgen.mpg.de/git-mirror/glibc/blob/master/sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S)
|
43 |
#[allow(clippy::cast_ptr_alignment)]
|
44 |
#[cfg(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"))]
|
220 |
#[allow(clippy::cast_ptr_alignment)]
|
221 |
let init_with_delegate = delegate as *mut Object as *mut *mut Object;
|
89 |
#[allow(clippy::cast_ptr_alignment)] // Cast *mut u8 to *mut AudioBufferList
|
90 |
pub fn get_channel_count(&self, scope: Scope) -> Result<u32, OSStatus> {
|
143 |
/// [IETF RFC 1071]: https://tools.ietf.org/html/rfc1071
|
144 |
#[allow(clippy::cast_ptr_alignment)]
|
145 |
pub fn compute(pseudo_header_sum: u16, payload: &[u8]) -> u16 {
|
282 |
#[allow(clippy::cast_ptr_alignment)]
|
283 |
let num_accounts = *(input.add(offset) as *const u64) as usize;
|
292 |
if dup_info == NON_DUP_MARKER {
|
293 |
#[allow(clippy::cast_ptr_alignment)]
|
294 |
let is_signer = *(input.add(offset) as *const u8) != 0;
|
297 |
#[allow(clippy::cast_ptr_alignment)]
|
298 |
let is_writable = *(input.add(offset) as *const u8) != 0;
|
301 |
#[allow(clippy::cast_ptr_alignment)]
|
302 |
let executable = *(input.add(offset) as *const u8) != 0;
|
317 |
#[allow(clippy::cast_ptr_alignment)]
|
318 |
let scoobies = Rc::new(RefCell::new(&mut *(input.add(offset) as *mut u64)));
|
69 |
#[allow(clippy::cast_ptr_alignment)]
|
70 |
let num_accounts = *(input.add(offset) as *const u64) as usize;
|
79 |
if dup_info == std::u8::MAX {
|
80 |
#[allow(clippy::cast_ptr_alignment)]
|
81 |
let is_signer = *(input.add(offset) as *const u8) != 0;
|
84 |
#[allow(clippy::cast_ptr_alignment)]
|
85 |
let is_writable = *(input.add(offset) as *const u8) != 0;
|
91 |
#[allow(clippy::cast_ptr_alignment)]
|
92 |
let scoobies = Rc::new(RefCell::new(&mut *(input.add(offset) as *mut u64)));
|
95 |
#[allow(clippy::cast_ptr_alignment)]
|
96 |
let data_len = *(input.add(offset) as *const u64) as usize;
|
716 |
let ptr = self.result.text_section.as_ptr().add(self.offset_in_text_section);
|
717 |
#[allow(clippy::cast_ptr_alignment)]
|
718 |
ptr::write_unaligned(ptr as *mut T, data as T);
|
427 |
if self.is_chain::<T>() {
|
428 |
#[allow(clippy::cast_ptr_alignment)]
|
429 |
unsafe {
|
440 |
if self.is_chain::<T>() {
|
441 |
#[allow(clippy::cast_ptr_alignment)]
|
442 |
unsafe {
|
452 |
if self.is_chain::<T>() {
|
453 |
#[allow(clippy::cast_ptr_alignment)]
|
454 |
unsafe {
|
465 |
if self.is_chain::<T>() {
|
466 |
#[allow(clippy::cast_ptr_alignment)]
|
467 |
unsafe {
|
45 |
#[allow(clippy::cast_ptr_alignment, unsafe_code)]
|
46 |
/// # Custom Malloc.
|
61 |
#[allow(clippy::cast_ptr_alignment, unsafe_code)]
|
62 |
/// # Custom Free.
|
73 |
// TODO: return done_guard to mark as concurrently readable
|
74 |
#[allow(clippy::cast_ptr_alignment)]
|
75 |
pub unsafe fn enqueue(&mut self, size: usize) -> *mut u8 {
|
144 |
#[allow(clippy::cast_ptr_alignment)]
|
145 |
match *(entry_ptr as *mut NextItemRef) {
|
32 |
impl<'r> Unpack<u32> for packed::Uint32Reader<'r> {
|
33 |
#[allow(clippy::cast_ptr_alignment)]
|
34 |
fn unpack(&self) -> u32 {
|
41 |
impl<'r> Unpack<u64> for packed::Uint64Reader<'r> {
|
42 |
#[allow(clippy::cast_ptr_alignment)]
|
43 |
fn unpack(&self) -> u64 {
|
50 |
impl<'r> Unpack<u128> for packed::Uint128Reader<'r> {
|
51 |
#[allow(clippy::cast_ptr_alignment)]
|
52 |
fn unpack(&self) -> u128 {
|
10 |
#[target_feature(enable = "avx2")]
|
11 |
#[allow(clippy::cast_ptr_alignment)]
|
12 |
pub unsafe fn load_packed_flag(flag: &[u8]) -> Box<[u32]> {
|
32 |
#[allow(clippy::cast_ptr_alignment)]
|
33 |
#[inline]
|
40 |
#[allow(clippy::cast_ptr_alignment)]
|
41 |
#[inline]
|
48 |
#[cfg(target_endian = "little")]
|
49 |
#[allow(clippy::cast_ptr_alignment)]
|
50 |
#[inline]
|
57 |
#[cfg(target_endian = "little")]
|
58 |
#[allow(clippy::cast_ptr_alignment)]
|
59 |
#[inline]
|
66 |
#[cfg(not(target_endian = "little"))]
|
67 |
#[allow(clippy::cast_ptr_alignment)]
|
68 |
#[inline]
|
76 |
#[cfg(not(target_endian = "little"))]
|
77 |
#[allow(clippy::cast_ptr_alignment)]
|
78 |
#[inline]
|
194 |
unsafe fn get_entry_info(&self, offset: usize) -> (Option<libc::c_int>, usize) {
|
195 |
#[allow(clippy::cast_ptr_alignment)] // We trust the kernel not to make us segfault
|
196 |
let entry = &*(self.dirent_buf.data.as_ptr().add(offset) as *const RawDirent);
|
37 |
#[allow(clippy::cast_ptr_alignment)]
|
38 |
let ptr = alloc_zeroed(layout) as *mut Self;
|
53 |
#[allow(clippy::cast_ptr_alignment)]
|
54 |
let ptr = alloc_zeroed(layout) as *mut Self;
|
450 |
#[cfg(feature = "profile")]
|
451 |
#[allow(clippy::cast_ptr_alignment)]
|
452 |
let end = {
|
1280 |
#[inline]
|
1281 |
#[allow(clippy::cast_ptr_alignment)]
|
1282 |
pub fn utilization(&self) -> UtilizationProfile {
|
1298 |
#[inline]
|
1299 |
#[allow(clippy::cast_ptr_alignment)]
|
1300 |
fn profile_meta_data_mut(&mut self) -> &mut ProfileMetaData {
|
96 |
#[inline]
|
97 |
#[allow(clippy::cast_ptr_alignment)]
|
98 |
fn get_co_local(co: &CoroutineImpl) -> *mut CoroutineLocal {
|
48 |
let ptr = get_local_data();
|
49 |
#[allow(clippy::cast_ptr_alignment)]
|
50 |
NonNull::new(ptr as *mut CoroutineLocal)
|
1997 |
#[allow(clippy::cast_ptr_alignment)]
|
1998 |
fn free(node: *mut Self) {
|
1620 |
#[stable(feature = "simd_x86", since = "1.27.0")]
|
1621 |
#[allow(clippy::cast_ptr_alignment)]
|
1622 |
pub unsafe fn _mm256_load_pd(mem_addr: *const f64) -> __m256d {
|
1635 |
#[stable(feature = "simd_x86", since = "1.27.0")]
|
1636 |
#[allow(clippy::cast_ptr_alignment)]
|
1637 |
pub unsafe fn _mm256_store_pd(mem_addr: *const f64, a: __m256d) {
|
1650 |
#[stable(feature = "simd_x86", since = "1.27.0")]
|
1651 |
#[allow(clippy::cast_ptr_alignment)]
|
1652 |
pub unsafe fn _mm256_load_ps(mem_addr: *const f32) -> __m256 {
|
1665 |
#[stable(feature = "simd_x86", since = "1.27.0")]
|
1666 |
#[allow(clippy::cast_ptr_alignment)]
|
1667 |
pub unsafe fn _mm256_store_ps(mem_addr: *const f32, a: __m256) {
|
1961 |
#[stable(feature = "simd_x86", since = "1.27.0")]
|
1962 |
#[allow(clippy::cast_ptr_alignment)]
|
1963 |
pub unsafe fn _mm256_stream_pd(mem_addr: *mut f64, a: __m256d) {
|
1211 |
#[stable(feature = "simd_x86", since = "1.27.0")]
|
1212 |
#[allow(clippy::cast_ptr_alignment)]
|
1213 |
pub unsafe fn _mm_load_ps(p: *const f32) -> __m128 {
|
1372 |
#[stable(feature = "simd_x86", since = "1.27.0")]
|
1373 |
#[allow(clippy::cast_ptr_alignment)]
|
1374 |
pub unsafe fn _mm_store1_ps(p: *mut f32, a: __m128) {
|
1404 |
#[stable(feature = "simd_x86", since = "1.27.0")]
|
1405 |
#[allow(clippy::cast_ptr_alignment)]
|
1406 |
pub unsafe fn _mm_store_ps(p: *mut f32, a: __m128) {
|
1448 |
#[stable(feature = "simd_x86", since = "1.27.0")]
|
1449 |
#[allow(clippy::cast_ptr_alignment)]
|
1450 |
pub unsafe fn _mm_storer_ps(p: *mut f32, a: __m128) {
|
2035 |
#[stable(feature = "simd_x86", since = "1.27.0")]
|
2036 |
#[allow(clippy::cast_ptr_alignment)]
|
2037 |
pub unsafe fn _mm_stream_ps(mem_addr: *mut f32, a: __m128) {
|
29 |
let split = len & !0b11;
|
30 |
#[allow(clippy::cast_ptr_alignment)]
|
31 |
write_words(
|
44 |
#[allow(clippy::cast_ptr_alignment)]
|
45 |
port.write_u16(ptr::read(ptr as *const u16));
|
102 |
// We checked the alignment above, so this is safe
|
103 |
#[allow(clippy::cast_ptr_alignment)]
|
104 |
port.write_u16(ptr::read(ptr as *const u16));
|
216 |
// Logic re-used between `supported_input_configs` and `supported_output_configs`.
|
217 |
#[allow(clippy::cast_ptr_alignment)]
|
218 |
fn supported_configs(
|
511 |
impl Device {
|
512 |
#[allow(clippy::cast_ptr_alignment)]
|
513 |
#[allow(clippy::while_immutable_condition)]
|
262 |
// TODO: Handle overflow.
|
263 |
#[cfg_attr(feature = "cargo-clippy", allow(cast_ptr_alignment))]
|
264 |
unsafe {
|
268 |
Reloc::Abs8 => {
|
269 |
#[cfg_attr(feature = "cargo-clippy", allow(cast_ptr_alignment))]
|
270 |
unsafe {
|
276 |
let pcrel = ((what as isize) - (at as isize)) as i32;
|
277 |
#[cfg_attr(feature = "cargo-clippy", allow(cast_ptr_alignment))]
|
278 |
unsafe {
|
327 |
// TODO: Handle overflow.
|
328 |
#[cfg_attr(feature = "cargo-clippy", allow(cast_ptr_alignment))]
|
329 |
unsafe {
|
333 |
Reloc::Abs8 => {
|
334 |
#[cfg_attr(feature = "cargo-clippy", allow(cast_ptr_alignment))]
|
335 |
unsafe {
|
293 |
// This part specifically is okay because alignment is designed in
|
294 |
#[allow(clippy::cast_ptr_alignment)]
|
295 |
self_data
|
113 |
#[allow(clippy::cast_ptr_alignment)]
|
114 |
tiny_keccak::keccakf(unsafe { &mut *(keccac as *mut GenericArray<u8, U200> as *mut [u64; 25]) });
|
1 |
#![allow(clippy::cast_ptr_alignment)]
|
173 |
pub(crate) fn output_bytes(&self, output: &mut [u8]) {
|
174 |
#[allow(clippy::cast_ptr_alignment)]
|
175 |
let o = output.as_mut_ptr() as *mut __m128i;
|
185 |
pub(crate) fn output_ad_bytes(&self, output: &mut [u8; 32]) {
|
186 |
#[allow(clippy::cast_ptr_alignment)]
|
187 |
let o = output.as_mut_ptr() as *mut __m128i;
|
32 |
// Safe because _mm256_loadu_si256 loads from unaligned memory
|
33 |
#[allow(clippy::cast_ptr_alignment)]
|
34 |
let low_table =
|
36 |
// Safe because _mm256_loadu_si256 loads from unaligned memory
|
37 |
#[allow(clippy::cast_ptr_alignment)]
|
38 |
let hi_table =
|
41 |
for i in 0..(octets.len() / 32) {
|
42 |
#[allow(clippy::cast_ptr_alignment)]
|
43 |
let self_vec = _mm256_loadu_si256((self_avx_ptr as *const __m256i).add(i));
|
49 |
let result = _mm256_xor_si256(hi_result, low_result);
|
50 |
#[allow(clippy::cast_ptr_alignment)]
|
51 |
_mm256_storeu_si256((self_avx_ptr as *mut __m256i).add(i), result);
|
73 |
let self_ssse_ptr = octets.as_mut_ptr();
|
74 |
#[allow(clippy::cast_ptr_alignment)]
|
75 |
let low_table =
|
153 |
if sa_family == AF_INET as u32 {
|
154 |
#[cfg_attr(feature = "cargo-clippy", allow(cast_ptr_alignment))]
|
155 |
let sa = &unsafe { *(sockaddr as *const posix_sockaddr_in) };
|
162 |
} else if sa_family == AF_INET6 as u32 {
|
163 |
#[cfg_attr(feature = "cargo-clippy", allow(cast_ptr_alignment))]
|
164 |
let sa = &unsafe { *(sockaddr as *const posix_sockaddr_in6) };
|
73 |
#[inline]
|
74 |
#[allow(clippy::cast_ptr_alignment)] // unaligned load
|
75 |
pub unsafe fn load(ptr: *const u8) -> Self {
|
81 |
#[inline]
|
82 |
#[allow(clippy::cast_ptr_alignment)]
|
83 |
pub unsafe fn load_aligned(ptr: *const u8) -> Self {
|
91 |
#[inline]
|
92 |
#[allow(clippy::cast_ptr_alignment)]
|
93 |
pub unsafe fn store_aligned(self, ptr: *mut u8) {
|
44 |
#[inline]
|
45 |
#[allow(clippy::cast_ptr_alignment)] // unaligned load
|
46 |
pub unsafe fn load(ptr: *const u8) -> Self {
|
52 |
#[inline]
|
53 |
#[allow(clippy::cast_ptr_alignment)]
|
54 |
pub unsafe fn load_aligned(ptr: *const u8) -> Self {
|
62 |
#[inline]
|
63 |
#[allow(clippy::cast_ptr_alignment)]
|
64 |
pub unsafe fn store_aligned(self, ptr: *mut u8) {
|
346 |
#[test]
|
347 |
#[allow(clippy::cast_ptr_alignment)]
|
348 |
fn test_setup_msrs() {
|
139 |
fn from_ptr_unchecked(ptr: *const u8) -> Self {
|
140 |
#[allow(clippy::cast_ptr_alignment)]
|
141 |
Self {
|
1792 |
// Check all samples are correct
|
1793 |
#[allow(clippy::cast_ptr_alignment)]
|
1794 |
let dst_image_as_u64: &[u64] =
|
397 |
let bytes = get_rawinput_device_info_impl(device_id, RIDI_DEVICEINFO);
|
398 |
#[allow(clippy::cast_ptr_alignment)]
|
399 |
unsafe {
|
40 |
// https://github.com/rust-lang/rust-clippy/issues/2881
|
41 |
#[allow(dead_code, clippy::cast_ptr_alignment)]
|
42 |
pub(crate) fn time_value(&self) -> deserialize::Result<MysqlTime> {
|
273 |
#[allow(clippy::cast_ptr_alignment)]
|
274 |
let num_accounts = *(input.add(offset) as *const u64) as usize;
|
283 |
if dup_info == std::u8::MAX {
|
284 |
#[allow(clippy::cast_ptr_alignment)]
|
285 |
let is_signer = *(input.add(offset) as *const u8) != 0;
|
288 |
#[allow(clippy::cast_ptr_alignment)]
|
289 |
let is_writable = *(input.add(offset) as *const u8) != 0;
|
292 |
#[allow(clippy::cast_ptr_alignment)]
|
293 |
let executable = *(input.add(offset) as *const u8) != 0;
|
304 |
#[allow(clippy::cast_ptr_alignment)]
|
305 |
let lamports = Rc::new(RefCell::new(&mut *(input.add(offset) as *mut u64)));
|
63 |
#[allow(clippy::cast_ptr_alignment)]
|
64 |
let num_accounts = *(input.add(offset) as *const u64) as usize;
|
73 |
if dup_info == std::u8::MAX {
|
74 |
#[allow(clippy::cast_ptr_alignment)]
|
75 |
let is_signer = *(input.add(offset) as *const u8) != 0;
|
78 |
#[allow(clippy::cast_ptr_alignment)]
|
79 |
let is_writable = *(input.add(offset) as *const u8) != 0;
|
85 |
#[allow(clippy::cast_ptr_alignment)]
|
86 |
let lamports = Rc::new(RefCell::new(&mut *(input.add(offset) as *mut u64)));
|
89 |
#[allow(clippy::cast_ptr_alignment)]
|
90 |
let data_len = *(input.add(offset) as *const u64) as usize;
|
273 |
#[allow(clippy::cast_ptr_alignment)]
|
274 |
let num_accounts = *(input.add(offset) as *const u64) as usize;
|
283 |
if dup_info == std::u8::MAX {
|
284 |
#[allow(clippy::cast_ptr_alignment)]
|
285 |
let is_signer = *(input.add(offset) as *const u8) != 0;
|
288 |
#[allow(clippy::cast_ptr_alignment)]
|
289 |
let is_writable = *(input.add(offset) as *const u8) != 0;
|
292 |
#[allow(clippy::cast_ptr_alignment)]
|
293 |
let executable = *(input.add(offset) as *const u8) != 0;
|
304 |
#[allow(clippy::cast_ptr_alignment)]
|
305 |
let lamports = Rc::new(RefCell::new(&mut *(input.add(offset) as *mut u64)));
|
63 |
#[allow(clippy::cast_ptr_alignment)]
|
64 |
let num_accounts = *(input.add(offset) as *const u64) as usize;
|
73 |
if dup_info == std::u8::MAX {
|
74 |
#[allow(clippy::cast_ptr_alignment)]
|
75 |
let is_signer = *(input.add(offset) as *const u8) != 0;
|
78 |
#[allow(clippy::cast_ptr_alignment)]
|
79 |
let is_writable = *(input.add(offset) as *const u8) != 0;
|
85 |
#[allow(clippy::cast_ptr_alignment)]
|
86 |
let lamports = Rc::new(RefCell::new(&mut *(input.add(offset) as *mut u64)));
|
89 |
#[allow(clippy::cast_ptr_alignment)]
|
90 |
let data_len = *(input.add(offset) as *const u64) as usize;
|
62 |
/// * `ptr` must not be used after deallocation.
|
63 |
#[allow(clippy::cast_ptr_alignment)]
|
64 |
pub unsafe fn deallocate(&self, ptr: NonNull<u8>) {
|
79 |
#[allow(clippy::cast_ptr_alignment)]
|
80 |
unsafe fn alloc_free(&self) -> Option<NonNull<u8>> {
|
143 |
#[allow(clippy::cast_ptr_alignment)]
|
144 |
unsafe fn mpu_config(mut guard_ptr: *mut u8) -> u32 {
|
277 |
#[allow(clippy::cast_ptr_alignment)]
|
278 |
pub(super) unsafe fn config(mut guard_ptr: *mut u8) -> u32 {
|
34 |
#[cfg_attr(feature = "cargo-clippy", allow(cast_ptr_alignment))]
|
35 |
fn disk_ioctl(cmd: u8, buff: *mut u8) -> DRESULT {
|
108 |
#[allow(clippy::cast_ptr_alignment)]
|
109 |
unsafe fn fill_buf(buf_ptr: *mut u8, port: u8, bytes: &[u8]) -> u32 {
|
574 |
#[cfg_attr(feature = "cargo-clippy", allow(cast_ptr_alignment))]
|
575 |
#[inline(always)]
|
454 |
impl Ocr {
|
455 |
#[cfg_attr(feature = "cargo-clippy", allow(cast_ptr_alignment))]
|
456 |
pub(crate) fn from_buf(buf: &[u8]) -> Self {
|
474 |
impl Csd {
|
475 |
#[cfg_attr(feature = "cargo-clippy", allow(cast_ptr_alignment))]
|
476 |
pub(crate) fn from_buf(buf: &[u8]) -> Self {
|
614 |
impl Cond {
|
615 |
#[cfg_attr(feature = "cargo-clippy", allow(cast_ptr_alignment))]
|
616 |
pub(crate) fn from_buf(buf: &[u8]) -> Self {
|
134 |
#[cfg_attr(feature = "cargo-clippy", allow(cast_ptr_alignment))]
|
135 |
unsafe fn mpu_config(mut guard_ptr: *mut u8) -> u32 {
|
78 |
#[allow(clippy::cast_ptr_alignment)]
|
79 |
fn read_property(&mut self) -> Result<StructItem<'a>> {
|
115 |
/// Advances the iterator and returns the next structure item or error.
|
116 |
#[allow(clippy::cast_ptr_alignment)]
|
117 |
pub fn next_item(&mut self) -> Result<StructItem<'a>> {
|
302 |
impl<'a> Reader<'a> {
|
303 |
#[allow(clippy::cast_ptr_alignment)]
|
304 |
fn get_header(blob: &'a [u8]) -> Result<Header> {
|
340 |
#[allow(clippy::cast_ptr_alignment)]
|
341 |
fn get_reserved_mem(
|
113 |
/// Returns integer list value for Property structure items.
|
114 |
#[allow(clippy::cast_ptr_alignment)]
|
115 |
pub fn value_u32_list<'b>(&self, buf: &'b mut [u8]) -> Result<&'b [u32]> {
|
29 |
/// Adds a new reserved memory entry.
|
30 |
#[allow(clippy::cast_ptr_alignment)]
|
31 |
pub fn add_entry(&mut self, address: u64, size: u64) -> Result<()> {
|
87 |
let memory = memory.as_ptr();
|
88 |
#[allow(clippy::cast_ptr_alignment)] // alignment is asserted above
|
89 |
&*(memory
|
109 |
let memory = memory.as_mut_ptr();
|
110 |
#[allow(clippy::cast_ptr_alignment)] // alignment is asserted above
|
111 |
&mut *(memory
|
76 |
let headers: &[ProgramHeader] = unsafe {
|
77 |
#[allow(clippy::cast_ptr_alignment)]
|
78 |
core::slice::from_raw_parts(
|
68 |
let headers: &[ProgramHeader] = unsafe {
|
69 |
#[allow(clippy::cast_ptr_alignment)]
|
70 |
core::slice::from_raw_parts(
|
481 |
#[inline]
|
482 |
#[allow(clippy::cast_ptr_alignment)]
|
483 |
fn as_ptr(&self) -> *const Self::NativeType {
|
488 |
#[inline]
|
489 |
#[allow(clippy::cast_ptr_alignment)]
|
490 |
fn as_mut_ptr(&mut self) -> *mut Self::NativeType {
|
259 |
// Add to self
|
260 |
#[allow(clippy::cast_ptr_alignment)]
|
261 |
let self_vec = _mm256_loadu_si256((self_avx_ptr as *const __m256i).add(i));
|
262 |
let result = _mm256_xor_si256(self_vec, product);
|
263 |
#[allow(clippy::cast_ptr_alignment)]
|
264 |
_mm256_storeu_si256((self_avx_ptr as *mut __m256i).add(i), result);
|
293 |
let self_neon_ptr = octets.as_mut_ptr();
|
294 |
#[allow(clippy::cast_ptr_alignment)]
|
295 |
let low_table = vld1q_u8(OCTET_MUL_LOW_BITS[scalar.byte() as usize].as_ptr());
|
296 |
#[allow(clippy::cast_ptr_alignment)]
|
297 |
let hi_table = vld1q_u8(OCTET_MUL_HI_BITS[scalar.byte() as usize].as_ptr());
|
300 |
// Multiply by scalar
|
301 |
#[allow(clippy::cast_ptr_alignment)]
|
302 |
let self_vec = vld1q_u8(self_neon_ptr.add(i * mem::size_of::<uint8x16_t>()));
|
64 |
assert_eq_align!(fdt_prop_header, u32);
|
65 |
#[allow(clippy::cast_ptr_alignment)]
|
66 |
let header = &*(header_slice.as_ptr() as *const fdt_prop_header);
|
96 |
// We use read_unaligned
|
97 |
#[allow(clippy::cast_ptr_alignment)]
|
98 |
let v = read_unaligned::<u32>(val.as_ptr() as *const u32);
|
49 |
fn embedding(&self, idx: usize) -> CowArray<f32, Ix1> {
|
50 |
#[allow(clippy::cast_ptr_alignment,unused_mut)]
|
51 |
let mut embedding =
|
69 |
fn embeddings(&self, indices: &[usize]) -> Array2<f32> {
|
70 |
#[allow(clippy::cast_ptr_alignment,unused_mut)]
|
71 |
let embeddings =
|
98 |
// a multiple of 4.
|
99 |
#[allow(clippy::cast_ptr_alignment)]
|
100 |
unsafe {
|
156 |
#[cfg_attr(feature = "cargo-clippy", allow(cast_ptr_alignment))]
|
157 |
pub(crate) fn with_set_cx<R>(current: &mut TaskContext<'_>, f: impl FnOnce() -> R) -> R {
|
37 |
// I pray this is also safe, otherwise we're in trouble.
|
38 |
#[allow(clippy::cast_ptr_alignment)]
|
39 |
ptr::write(data.as_mut_ptr() as *mut F, f);
|
56 |
// this should be safe but another pair of eyes wouldn't hurt
|
57 |
#[allow(clippy::cast_ptr_alignment)]
|
58 |
ptr::write(data.as_mut_ptr() as *mut Box<F>, b);
|
60 |
unsafe fn call<F: FnOnce()>(raw: *mut u8) {
|
61 |
#[allow(clippy::cast_ptr_alignment)]
|
62 |
let b: Box<F> = ptr::read(raw as *mut Box<F>);
|
225 |
.map(|pointer_data| {
|
226 |
#[allow(clippy::cast_ptr_alignment)] // Read unaligned.
|
227 |
pointer_data.as_ptr().cast::<&TActual>().read_unaligned()
|
340 |
.map(|pointer_data| {
|
341 |
#[allow(clippy::cast_ptr_alignment)] // Read unaligned.
|
342 |
Box::from_raw(
|
382 |
.map(|pointer_data| {
|
383 |
#[allow(clippy::cast_ptr_alignment)] // Read unaligned.
|
384 |
Pin::new_unchecked(Box::from_raw(
|
259 |
// That's exactly what's being tested here. Thanks clippy!
|
260 |
#[allow(clippy::cast_ptr_alignment)]
|
261 |
let unaligned = unsafe { (aligned as *const u8).add(1) as *const i64 };
|
285 |
// That's exactly what's being tested here. Thanks clippy!
|
286 |
#[allow(clippy::cast_ptr_alignment)]
|
287 |
let unaligned_ptr = unsafe {
|
550 |
#[allow(clippy::cast_ptr_alignment)]
|
551 |
let num_accounts = *(input.add(offset) as *const u64) as usize;
|
560 |
if dup_info == std::u8::MAX {
|
561 |
#[allow(clippy::cast_ptr_alignment)]
|
562 |
let is_signer = *(input.add(offset) as *const u8) != 0;
|
565 |
#[allow(clippy::cast_ptr_alignment)]
|
566 |
let is_writable = *(input.add(offset) as *const u8) != 0;
|
572 |
#[allow(clippy::cast_ptr_alignment)]
|
573 |
let carats = Rc::new(RefCell::new(&mut *(input.add(offset) as *mut u64)));
|
576 |
#[allow(clippy::cast_ptr_alignment)]
|
577 |
let data_len = *(input.add(offset) as *const u64) as usize;
|
247 |
elems.push(perf_libs::Elems {
|
248 |
#[allow(clippy::cast_ptr_alignment)]
|
249 |
elems: pubkeys.as_ptr() as *const gemachain_sdk::packet::Packet,
|
384 |
elems.push(perf_libs::Elems {
|
385 |
#[allow(clippy::cast_ptr_alignment)]
|
386 |
elems: pinned_keypair.as_ptr() as *const gemachain_sdk::packet::Packet,
|
151 |
#[allow(clippy::cast_ptr_alignment)]
|
152 |
let num_accounts = *(input.add(offset) as *const u64) as usize;
|
161 |
if dup_info == std::u8::MAX {
|
162 |
#[allow(clippy::cast_ptr_alignment)]
|
163 |
let is_signer = *(input.add(offset) as *const u8) != 0;
|
166 |
#[allow(clippy::cast_ptr_alignment)]
|
167 |
let is_writable = *(input.add(offset) as *const u8) != 0;
|
170 |
#[allow(clippy::cast_ptr_alignment)]
|
171 |
let executable = *(input.add(offset) as *const u8) != 0;
|
182 |
#[allow(clippy::cast_ptr_alignment)]
|
183 |
let carats = Rc::new(RefCell::new(&mut *(input.add(offset) as *mut u64)));
|
62 |
#[allow(clippy::cast_ptr_alignment)]
|
63 |
let num_accounts = *(input.add(offset) as *const u64) as usize;
|
72 |
if dup_info == std::u8::MAX {
|
73 |
#[allow(clippy::cast_ptr_alignment)]
|
74 |
let is_signer = *(input.add(offset) as *const u8) != 0;
|
77 |
#[allow(clippy::cast_ptr_alignment)]
|
78 |
let is_writable = *(input.add(offset) as *const u8) != 0;
|
84 |
#[allow(clippy::cast_ptr_alignment)]
|
85 |
let carats = Rc::new(RefCell::new(&mut *(input.add(offset) as *mut u64)));
|
88 |
#[allow(clippy::cast_ptr_alignment)]
|
89 |
let data_len = *(input.add(offset) as *const u64) as usize;
|
203 |
unsafe {
|
204 |
#[allow(clippy::cast_ptr_alignment)]
|
205 |
let ptr = jit.result.text_section.as_ptr().add(jit.offset_in_text_section) as *mut T;
|
172 |
if sa_family == AF_INET as u32 {
|
173 |
#[cfg_attr(feature = "cargo-clippy", allow(cast_ptr_alignment))]
|
174 |
let sa = &unsafe { *(sockaddr as *const posix_sockaddr_in) };
|
181 |
} else if sa_family == AF_INET6 as u32 {
|
182 |
#[cfg_attr(feature = "cargo-clippy", allow(cast_ptr_alignment))]
|
183 |
let sa = &unsafe { *(sockaddr as *const posix_sockaddr_in6) };
|
224 |
// This is horrible.
|
225 |
#[allow(clippy::cast_ptr_alignment)]
|
226 |
let addr6: *const SOCKADDR_IN6_LH = aptr as *const SOCKADDR_IN6_LH;
|
4119 |
SHORT => {
|
4120 |
#[allow(clippy::cast_ptr_alignment)]
|
4121 |
let data = from_raw_parts(bytes.as_ptr() as *const i16, bytes.len() / size_of::<i16>());
|
4129 |
| HALF_FLOAT => {
|
4130 |
#[allow(clippy::cast_ptr_alignment)]
|
4131 |
let data = from_raw_parts(bytes.as_ptr() as *const u16, bytes.len() / size_of::<u16>());
|
4135 |
INT => {
|
4136 |
#[allow(clippy::cast_ptr_alignment)]
|
4137 |
let data = from_raw_parts(bytes.as_ptr() as *const i32, bytes.len() / size_of::<i32>());
|
4145 |
| UNSIGNED_INT_24_8 => {
|
4146 |
#[allow(clippy::cast_ptr_alignment)]
|
4147 |
let data = from_raw_parts(bytes.as_ptr() as *const u32, bytes.len() / size_of::<u32>());
|
4151 |
FLOAT => {
|
4152 |
#[allow(clippy::cast_ptr_alignment)]
|
4153 |
let data = from_raw_parts(bytes.as_ptr() as *const f32, bytes.len() / size_of::<f32>());
|
203 |
unsafe {
|
204 |
#[allow(clippy::cast_ptr_alignment)]
|
205 |
let ptr = jit.result.text_section.as_ptr().add(jit.offset_in_text_section) as *mut T;
|
4757 |
SHORT => {
|
4758 |
#[allow(clippy::cast_ptr_alignment)]
|
4759 |
let data = from_raw_parts(bytes.as_ptr() as *const i16, bytes.len() / size_of::<i16>());
|
4767 |
| HALF_FLOAT => {
|
4768 |
#[allow(clippy::cast_ptr_alignment)]
|
4769 |
let data = from_raw_parts(bytes.as_ptr() as *const u16, bytes.len() / size_of::<u16>());
|
4773 |
INT => {
|
4774 |
#[allow(clippy::cast_ptr_alignment)]
|
4775 |
let data = from_raw_parts(bytes.as_ptr() as *const i32, bytes.len() / size_of::<i32>());
|
4783 |
| UNSIGNED_INT_24_8 => {
|
4784 |
#[allow(clippy::cast_ptr_alignment)]
|
4785 |
let data = from_raw_parts(bytes.as_ptr() as *const u32, bytes.len() / size_of::<u32>());
|
4789 |
FLOAT => {
|
4790 |
#[allow(clippy::cast_ptr_alignment)]
|
4791 |
let data = from_raw_parts(bytes.as_ptr() as *const f32, bytes.len() / size_of::<f32>());
|
560 |
}
|
561 |
#[allow(clippy::cast_ptr_alignment)]
|
562 |
let val: &T = unsafe { &*(&input[1] as *const u8 as *const T) };
|
124 |
#[allow(clippy::cast_ptr_alignment)]
|
125 |
let shader_info = vk::ShaderModuleCreateInfo::builder().code(unsafe {
|
134 |
#[allow(clippy::cast_ptr_alignment)]
|
135 |
let shader_info = vk::ShaderModuleCreateInfo::builder().code(unsafe {
|
290 |
unsafe fn tf512_impl(cv: &mut X4, data: *const u8) {
|
291 |
#[allow(clippy::cast_ptr_alignment)]
|
292 |
let data = data as *const __m128i;
|
471 |
unsafe fn tf1024_impl(cv: &mut X8, data: *const u8) {
|
472 |
#[allow(clippy::cast_ptr_alignment)]
|
473 |
let data = data as *const __m128i;
|
714 |
} else {
|
715 |
#[allow(clippy::cast_ptr_alignment)]
|
716 |
Self::from_values(
|
787 |
} else {
|
788 |
#[allow(clippy::cast_ptr_alignment)]
|
789 |
Self(slice::from_raw_parts(
|
884 |
} else {
|
885 |
#[allow(clippy::cast_ptr_alignment)]
|
886 |
Self::from_values(
|
957 |
} else {
|
958 |
#[allow(clippy::cast_ptr_alignment)]
|
959 |
Self(slice::from_raw_parts(
|
28 |
}
|
29 |
#[allow(clippy::cast_ptr_alignment)]
|
30 |
unsafe {
|
59 |
}
|
60 |
#[allow(clippy::cast_ptr_alignment)]
|
61 |
unsafe {
|
91 |
}
|
92 |
#[allow(clippy::cast_ptr_alignment)]
|
93 |
unsafe {
|
32 |
#[allow(clippy::type_complexity)]
|
33 |
#[allow(clippy::cast_ptr_alignment)]
|
34 |
#[allow(clippy::use_self)]
|
31 |
) -> SignalHandlerId {
|
32 |
#[allow(clippy::cast_ptr_alignment)]
|
33 |
unsafe {
|
49 |
) -> SignalHandlerId {
|
50 |
#[allow(clippy::cast_ptr_alignment)]
|
51 |
unsafe {
|
67 |
) -> SignalHandlerId {
|
68 |
#[allow(clippy::cast_ptr_alignment)]
|
69 |
unsafe {
|
53 |
pub fn repeat(&self) -> Vec<&str> {
|
54 |
#[allow(clippy::cast_ptr_alignment)]
|
55 |
unsafe {
|
73 |
assert_initialized_main_thread!();
|
74 |
#[allow(clippy::cast_ptr_alignment)]
|
75 |
unsafe {
|
31 |
#[inline]
|
32 |
#[allow(clippy::cast_ptr_alignment)]
|
33 |
#[cfg(feature = "raw")]
|
70 |
#[inline]
|
71 |
#[allow(clippy::cast_ptr_alignment)] // unaligned load
|
72 |
pub unsafe fn load(ptr: *const u8) -> Self {
|
78 |
#[inline]
|
79 |
#[allow(clippy::cast_ptr_alignment)]
|
80 |
pub unsafe fn load_aligned(ptr: *const u8) -> Self {
|
88 |
#[inline]
|
89 |
#[allow(clippy::cast_ptr_alignment)]
|
90 |
pub unsafe fn store_aligned(self, ptr: *mut u8) {
|
47 |
#[inline]
|
48 |
#[allow(clippy::cast_ptr_alignment)] // unaligned load
|
49 |
pub unsafe fn load(ptr: *const u8) -> Self {
|
55 |
#[inline]
|
56 |
#[allow(clippy::cast_ptr_alignment)]
|
57 |
pub unsafe fn load_aligned(ptr: *const u8) -> Self {
|
65 |
#[inline]
|
66 |
#[allow(clippy::cast_ptr_alignment)]
|
67 |
pub unsafe fn store_aligned(self, ptr: *mut u8) {
|
71 |
#[inline]
|
72 |
#[allow(clippy::cast_ptr_alignment)] // unaligned load
|
73 |
pub unsafe fn load(ptr: *const u8) -> Self {
|
79 |
#[inline]
|
80 |
#[allow(clippy::cast_ptr_alignment)]
|
81 |
pub unsafe fn load_aligned(ptr: *const u8) -> Self {
|
89 |
#[inline]
|
90 |
#[allow(clippy::cast_ptr_alignment)]
|
91 |
pub unsafe fn store_aligned(self, ptr: *mut u8) {
|
44 |
#[inline]
|
45 |
#[allow(clippy::cast_ptr_alignment)] // unaligned load
|
46 |
pub unsafe fn load(ptr: *const u8) -> Self {
|
52 |
#[inline]
|
53 |
#[allow(clippy::cast_ptr_alignment)]
|
54 |
pub unsafe fn load_aligned(ptr: *const u8) -> Self {
|
62 |
#[inline]
|
63 |
#[allow(clippy::cast_ptr_alignment)]
|
64 |
pub unsafe fn store_aligned(self, ptr: *mut u8) {
|
148 |
fn cancel(&mut self, reader: Box<FetchProcessReader>) {
|
149 |
#[allow(clippy::cast_ptr_alignment)]
|
150 |
let ptr = Box::into_raw(reader) as *mut FetchProcess;
|
23 |
// which is `#[repr(C)]` and generally should be fine.
|
24 |
#[allow(clippy::cast_ptr_alignment)]
|
25 |
pub fn get() -> Result<Self> {
|
86 |
#[allow(clippy::cast_ptr_alignment)]
|
87 |
fn next(&mut self) -> Option<Self::Item> {
|
61 |
#[allow(clippy::cast_ptr_alignment)]
|
62 |
fn next(&mut self) -> Option<Self::Item> {
|
164 |
/// 在指定偏移处读取一个 u8 数据。
|
165 |
#[allow(clippy::cast_ptr_alignment)]
|
166 |
#[inline]
|
176 |
/// 在指定偏移处读取一个 u16 数据。
|
177 |
#[allow(clippy::cast_ptr_alignment)]
|
178 |
#[inline]
|
188 |
/// 在指定偏移处读取一个 u32 数据。
|
189 |
#[allow(clippy::cast_ptr_alignment)]
|
190 |
#[inline]
|
200 |
/// 在指定偏移处读取一个 u64 数据。
|
201 |
#[allow(clippy::cast_ptr_alignment)]
|
202 |
#[inline]
|
212 |
/// 将一个 u8 数据写到指定偏移处。
|
213 |
#[allow(clippy::cast_ptr_alignment)]
|
214 |
#[inline]
|
30 |
#[inline]
|
31 |
#[allow(clippy::cast_ptr_alignment)]
|
32 |
#[cfg(feature = "raw")]
|
68 |
#[inline]
|
69 |
#[allow(clippy::cast_ptr_alignment)] // unaligned load
|
70 |
pub unsafe fn load(ptr: *const u8) -> Self {
|
80 |
#[inline]
|
81 |
#[allow(clippy::cast_ptr_alignment)]
|
82 |
pub unsafe fn load_aligned(ptr: *const u8) -> Self {
|
46 |
#[inline]
|
47 |
#[allow(clippy::cast_ptr_alignment)] // unaligned load
|
48 |
pub unsafe fn load(ptr: *const u8) -> Self {
|
60 |
#[inline]
|
61 |
#[allow(clippy::cast_ptr_alignment)]
|
62 |
pub unsafe fn load_aligned(ptr: *const u8) -> Self {
|
58 |
// originally derived from `*mut Box<F>`.
|
59 |
#[allow(clippy::cast_ptr_alignment)]
|
60 |
let b: Box<F> = ptr::read(raw as *mut Box<F>);
|
102 |
#[allow(unsafe_code)]
|
103 |
#[allow(clippy::cast_ptr_alignment)]
|
104 |
fn sa_in(&self) -> sockaddr_in {
|
108 |
#[allow(unsafe_code)]
|
109 |
#[allow(clippy::cast_ptr_alignment)]
|
110 |
fn sa_in6(&self) -> sockaddr_in6 {
|
377 |
crate::AddressFamily::IPv6 => {
|
378 |
#[allow(clippy::cast_ptr_alignment)]
|
379 |
let addr6: *const SOCKADDR_IN6_LH = sockaddr as *const SOCKADDR_IN6_LH;
|
27 |
/// Create a new probe with no features enabled.
|
28 |
#[allow(clippy::cast_ptr_alignment)]
|
29 |
pub fn new() -> Probe {
|
112 |
#[allow(clippy::cast_ptr_alignment)]
|
113 |
(*(map.as_ptr() as *const Header)).init()?;
|
102 |
pub fn header(&self) -> &Header {
|
103 |
#[allow(clippy::cast_ptr_alignment)]
|
104 |
unsafe {
|
232 |
pub fn header(&self) -> &Header {
|
233 |
#[allow(clippy::cast_ptr_alignment)]
|
234 |
unsafe {
|
343 |
let mut get_page = |index: u64| {
|
344 |
#[allow(clippy::cast_ptr_alignment)]
|
345 |
unsafe {
|
32 |
pub fn page<'a>(&self, id: PageID) -> &'a Page {
|
33 |
#[allow(clippy::cast_ptr_alignment)]
|
34 |
unsafe {
|
61 |
pub(crate) fn from_buf(buf: &[u8], id: PageID, pagesize: u64) -> &Page {
|
62 |
#[allow(clippy::cast_ptr_alignment)]
|
63 |
unsafe {
|
328 |
#[allow(clippy::cast_ptr_alignment)]
|
329 |
let mut page = unsafe { &mut *(&mut buf[0] as *mut u8 as *mut Page) };
|
54 |
// we allocate with correct alignment
|
55 |
#[allow(clippy::cast_ptr_alignment)]
|
56 |
unsafe fn new_raw(bytes: &[u8], is_utf8: bool) -> Self {
|
139 |
// in `new`, we allocate with correct alignment
|
140 |
#![allow(clippy::cast_ptr_alignment)]
|
141 |
this.0.as_ptr() as *const InnerHeader
|
144 |
// in `new`, we allocate with correct alignment
|
145 |
#![allow(clippy::cast_ptr_alignment)]
|
146 |
this.0.as_ptr().cast::<InnerHeader>()
|
79 |
#[target_feature(enable = "sse4.2")]
|
80 |
#[allow(clippy::cast_ptr_alignment)]
|
81 |
unsafe fn write_json_simd<W: io::Write>(s: &str, w: &mut W) -> io::Result<()> {
|
120 |
let words = unsafe {
|
121 |
#[allow(clippy::cast_ptr_alignment)]
|
122 |
slice::from_raw_parts(val.bytes.as_ptr().cast::<u16>(), val.bytes.len() / 2)
|
167 |
let words = unsafe {
|
168 |
#[allow(clippy::cast_ptr_alignment)]
|
169 |
slice::from_raw_parts(val.bytes.as_ptr().cast::<u16>(), val.bytes.len() / 2)
|
23 |
#[allow(clippy::cast_ptr_alignment)]
|
24 |
unsafe {
|
74 |
} else {
|
75 |
#[allow(clippy::cast_ptr_alignment)]
|
76 |
unsafe {
|
43 |
impl ShmReader {
|
44 |
#[allow(clippy::cast_ptr_alignment)]
|
45 |
pub(super) fn new(mut mmap: MmapMut) -> Result<ShmReader, ChannelError> {
|
115 |
impl Reader for ShmReader {
|
116 |
#[allow(clippy::cast_ptr_alignment)]
|
117 |
/// Attempts to read a message from the channel without blocking.
|
147 |
///
|
148 |
#[allow(clippy::cast_ptr_alignment)]
|
149 |
fn try_read<'a>(&mut self) -> Result<Option<&'a [u8]>, ReadError> {
|
46 |
impl<H: Handler> ShmWriter<H> {
|
47 |
#[allow(clippy::cast_ptr_alignment)]
|
48 |
pub(super) fn new(mut mmap: MmapMut, rec_handler: H) -> Result<ShmWriter<H>, ChannelError> {
|
120 |
///
|
121 |
#[allow(clippy::cast_ptr_alignment)]
|
122 |
fn write<E: Encodable>(&mut self, data: &E) -> Result<u32, WriteError> {
|
188 |
unsafe {
|
189 |
#[allow(clippy::cast_ptr_alignment)]
|
190 |
//we should always have the 8 bytes required by CLOSE as they are acounted in the Footer
|
42 |
impl ShmReader {
|
43 |
#[allow(clippy::cast_ptr_alignment)]
|
44 |
pub(super) fn new(mut mmap: MmapMut) -> Result<ShmReader, ChannelError> {
|
71 |
impl Reader for ShmReader {
|
72 |
#[allow(clippy::cast_ptr_alignment)]
|
73 |
///Reads up to `message_count` messages from the channel and for each message
|
48 |
impl<D: DataFormat> ShmWriter<D> {
|
49 |
#[allow(clippy::cast_ptr_alignment)]
|
50 |
pub(super) fn new(mut mmap: MmapMut, df: D) -> Result<ShmWriter<D>, ChannelError> {
|
129 |
///
|
130 |
#[allow(clippy::cast_ptr_alignment)]
|
131 |
fn write(&mut self, data: &impl Encodable<D>) -> Result<u32, WriteError> {
|
163 |
///
|
164 |
#[allow(clippy::cast_ptr_alignment)]
|
165 |
#[inline]
|
222 |
unsafe {
|
223 |
#[allow(clippy::cast_ptr_alignment)]
|
224 |
//we should always have the 8 bytes required by CLOSE as they are acounted in the Footer
|
79 |
pub fn as_mut_ref(&self) -> &mut kvm_run {
|
80 |
#[allow(clippy::cast_ptr_alignment)]
|
81 |
// SAFETY: Safe because we know we mapped enough memory to hold the kvm_run struct because
|
187 |
.unwrap();
|
188 |
#[allow(clippy::cast_ptr_alignment)]
|
189 |
let internal_msrs = unsafe { alloc_zeroed(layout) as *mut kvm_msrs };
|
41 |
///
|
42 |
#[allow(clippy::cast_ptr_alignment, clippy::unreadable_literal)]
|
43 |
#[doc(hidden)]
|
63 |
/// Like above but with 32 byte slices
|
64 |
#[allow(clippy::cast_ptr_alignment, clippy::unreadable_literal)]
|
65 |
#[doc(hidden)]
|
395 |
#[allow(trivial_numeric_casts)]
|
396 |
#[allow(clippy::cast_ptr_alignment)]
|
397 |
#[allow(clippy::cast_possible_wrap)]
|
327 |
#[inline]
|
328 |
#[allow(clippy::cast_ptr_alignment)]
|
329 |
unsafe fn shmem2page_mut<SHM: ShMem>(afl_shmem: &mut SHM) -> *mut LlmpPage {
|
334 |
#[inline]
|
335 |
#[allow(clippy::cast_ptr_alignment)]
|
336 |
unsafe fn shmem2page<SHM: ShMem>(afl_shmem: &SHM) -> *const LlmpPage {
|
513 |
#[inline]
|
514 |
#[allow(clippy::cast_ptr_alignment)]
|
515 |
unsafe fn _llmp_next_msg_ptr(last_msg: *const LlmpMsg) -> *mut LlmpMsg {
|
1146 |
#[allow(clippy::cast_ptr_alignment)]
|
1147 |
let mut end_of_page_msg = (*out).buf.as_mut_ptr() as *mut LlmpPayloadSharedMapInfo;
|
1456 |
#[allow(clippy::cast_ptr_alignment)]
|
1457 |
let pageinfo = (*msg).buf.as_mut_ptr() as *mut LlmpPayloadSharedMapInfo;
|
186 |
let ptr = self.shmem.as_slice().as_ptr();
|
187 |
#[allow(clippy::cast_ptr_alignment)] // Beginning of the page will always be aligned
|
188 |
unsafe {
|
194 |
fn content(&self) -> &StateShMemContent {
|
195 |
#[allow(clippy::cast_ptr_alignment)] // Beginning of the page will always be aligned
|
196 |
let ptr = self.shmem.as_slice().as_ptr() as *const StateShMemContent;
|
1223 |
#[inline]
|
1224 |
#[allow(clippy::cast_ptr_alignment)]
|
1225 |
fn post_exec(
|
1458 |
#[inline]
|
1459 |
#[allow(clippy::cast_ptr_alignment)]
|
1460 |
fn post_exec(
|
1 |
#[allow(clippy::cast_ptr_alignment)]
|
2 |
pub fn words_from_bytes(buf: &[u8]) -> &[u32] {
|
385 |
let logger_ptr: *const dyn Log = logger();
|
386 |
#[allow(clippy::cast_ptr_alignment)]
|
387 |
#[allow(clippy::ptr_as_ptr)]
|
836 |
#[inline(always)]
|
837 |
#[allow(clippy::cast_ptr_alignment)]
|
838 |
pub fn load_unaligned(addr: &[u8; 16]) -> Self {
|
1117 |
#[inline(always)]
|
1118 |
#[allow(clippy::cast_ptr_alignment)]
|
1119 |
pub fn store_unaligned(self, addr: &mut [u8; 16]) {
|
136 |
pub fn load_quick_unaligned(addr: *const i128) -> Self {
|
137 |
#[allow(clippy::cast_ptr_alignment)]
|
138 |
Self(unsafe { _mm_lddqu_si128(addr as *const _) })
|
92 |
#[inline]
|
93 |
#[allow(clippy::cast_ptr_alignment)]
|
94 |
fn get_co_local(co: &CoroutineImpl) -> *mut CoroutineLocal {
|
48 |
let ptr = get_local_data();
|
49 |
#[allow(clippy::cast_ptr_alignment)]
|
50 |
NonNull::new(ptr as *mut CoroutineLocal)
|
96 |
#[inline]
|
97 |
#[allow(clippy::cast_ptr_alignment)]
|
98 |
fn get_co_local(co: &CoroutineImpl) -> *mut CoroutineLocal {
|
48 |
let ptr = get_local_data();
|
49 |
#[allow(clippy::cast_ptr_alignment)]
|
50 |
NonNull::new(ptr as *mut CoroutineLocal)
|
19 |
unsafe {
|
20 |
#[allow(clippy::cast_ptr_alignment)]
|
21 |
let Header {
|
132 |
impl<T> MiniVec<T> {
|
133 |
#[allow(clippy::cast_ptr_alignment)]
|
134 |
fn is_default(&self) -> bool {
|
138 |
fn header(&self) -> &Header {
|
139 |
#[allow(clippy::cast_ptr_alignment)]
|
140 |
unsafe {
|
145 |
fn header_mut(&mut self) -> &mut Header {
|
146 |
#[allow(clippy::cast_ptr_alignment)]
|
147 |
unsafe {
|
199 |
#[allow(clippy::cast_ptr_alignment)]
|
200 |
unsafe {
|
632 |
///
|
633 |
#[allow(clippy::cast_ptr_alignment)]
|
634 |
pub unsafe fn from_raw_part(ptr: *mut T) -> MiniVec<T> {
|
186 |
if i32::from(unsafe { *raw_addr }.sa_family) == ws2def::AF_INET {
|
187 |
#[allow(clippy::cast_ptr_alignment)]
|
188 |
let saddr_in = raw_addr.cast::<SOCKADDR_IN>();
|
191 |
} else {
|
192 |
#[allow(clippy::cast_ptr_alignment)]
|
193 |
let saddr_in = raw_addr.cast::<SOCKADDR_IN6>();
|
12 |
unsafe {
|
13 |
#[allow(clippy::cast_ptr_alignment)]
|
14 |
let os2 =
|
256 |
{
|
257 |
#[allow(clippy::cast_ptr_alignment)]
|
258 |
let raw_points = &*(out_buffer.as_ptr() as *const mountmgr::MOUNTMGR_MOUNT_POINTS);
|
264 |
let link_bytes = &out_buffer[start..end];
|
265 |
#[allow(clippy::cast_ptr_alignment)]
|
266 |
let link_name: &[u16] = core::slice::from_raw_parts(link_bytes.as_ptr() as *const _, link_bytes.len() / 2);
|
274 |
let device_bytes = &out_buffer[start..end];
|
275 |
#[allow(clippy::cast_ptr_alignment)]
|
276 |
let device_name: &[u16] = core::slice::from_raw_parts(device_bytes.as_ptr() as *const _, device_bytes.len() / 2);
|
707 |
#[allow(clippy::cast_ptr_alignment)]
|
708 |
fn get_cmd_line_new(handle: HANDLE) -> Vec<String> {
|
818 |
#[allow(clippy::cast_ptr_alignment)]
|
819 |
let token_user = buf.as_ptr() as *const TOKEN_USER;
|
871 |
#[allow(clippy::cast_ptr_alignment)]
|
872 |
let token_groups = buf.as_ptr() as *const TOKEN_GROUPS;
|
91 |
/// in already is...
|
92 |
#[allow(clippy::cast_ptr_alignment)]
|
93 |
pub unsafe fn cl_create_program_with_binary(
|
39 |
#[allow(clippy::cast_ptr_alignment)]
|
40 |
let ptr = alloc_zeroed(layout) as *mut Self;
|
55 |
#[allow(clippy::cast_ptr_alignment)]
|
56 |
let ptr = alloc_zeroed(layout) as *mut Self;
|
468 |
.unwrap();
|
469 |
#[allow(clippy::cast_ptr_alignment)]
|
470 |
write_unaligned(libc::CMSG_DATA(cmsg) as *mut libc::c_int, fds[0]);
|
496 |
let cmsg = unsafe { libc::CMSG_FIRSTHDR(&msg) };
|
497 |
#[allow(clippy::cast_ptr_alignment)]
|
498 |
let fd = unsafe { read_unaligned(libc::CMSG_DATA(cmsg) as *mut libc::c_int) };
|
109 |
// https://github.com/rust-lang/rust-clippy/issues/2881
|
110 |
#[allow(clippy::cast_ptr_alignment)]
|
111 |
std::ptr::write_unaligned(libc::CMSG_FIRSTHDR(&msg), hdr);
|
113 |
// https://github.com/rust-lang/rust-clippy/issues/2881
|
114 |
#[allow(clippy::cast_ptr_alignment)]
|
115 |
std::ptr::write_unaligned(
|
172 |
// https://github.com/rust-lang/rust-clippy/issues/2881
|
173 |
#[allow(clippy::cast_ptr_alignment)]
|
174 |
let fd = std::ptr::read_unaligned(libc::CMSG_DATA(hdr) as *mut c_int);
|
97 |
// Actually accessing associated data would NOT be safe, so the user-provided handlers only see a NumberWindow<void> where such access is impossible.
|
98 |
#[allow(clippy::cast_ptr_alignment)]
|
99 |
NumberWindow::<void>::from_raw_unsized(
|
122 |
// Actually accessing associated data would NOT be safe, so the user-provided handlers only see a NumberWindow<void> where such access is impossible.
|
123 |
#[allow(clippy::cast_ptr_alignment)]
|
124 |
NumberWindow::<void>::from_raw_unsized(
|
147 |
// Actually accessing associated data would NOT be safe, so the user-provided handlers only see a NumberWindow<void> where such access is impossible.
|
148 |
#[allow(clippy::cast_ptr_alignment)]
|
149 |
NumberWindow::<void>::from_raw_unsized(
|
197 |
/// Sets numeric header, returning header offset.
|
198 |
#[allow(clippy::cast_ptr_alignment)]
|
199 |
#[inline]
|
153 |
/// Extracts a byte slice contains the entire numeric.
|
154 |
#[allow(clippy::cast_ptr_alignment)]
|
155 |
#[inline]
|
181 |
/// Creates a owned `NumericVar`. The `NumericBuf` cannot be used after calling this method.
|
182 |
#[allow(clippy::cast_ptr_alignment)]
|
183 |
#[inline]
|
406 |
/// Extracts a `NumericBinary` contains the entire numeric.
|
407 |
#[allow(clippy::cast_ptr_alignment)]
|
408 |
#[inline]
|
106 |
#[allow(clippy::cast_ptr_alignment)]
|
107 |
#[inline]
|
251 |
/// ```
|
252 |
#[allow(clippy::cast_ptr_alignment)]
|
253 |
#[inline]
|
262 |
/// ```
|
263 |
#[allow(clippy::cast_ptr_alignment)]
|
264 |
#[inline]
|
273 |
/// ```
|
274 |
#[allow(clippy::cast_ptr_alignment)]
|
275 |
#[inline]
|
484 |
#[allow(clippy::cast_ptr_alignment)]
|
485 |
fn get_logger() -> Option<&'static console_logger::ConsoleLogger> {
|
290 |
#[allow(clippy::many_single_char_names, clippy::cast_ptr_alignment)]
|
291 |
fn blend_rect_fast(
|
396 |
#[allow(clippy::many_single_char_names, clippy::cast_ptr_alignment)]
|
397 |
fn fill_rect_fast(
|
509 |
#[allow(clippy::many_single_char_names, clippy::cast_ptr_alignment)]
|
510 |
fn blend_rect_fast(
|
604 |
#[allow(clippy::many_single_char_names, clippy::cast_ptr_alignment)]
|
605 |
fn fill_rect_fast(
|
28 |
#[allow(clippy::many_single_char_names, clippy::cast_ptr_alignment)]
|
29 |
fn blend_rect_fast(
|
123 |
#[allow(clippy::many_single_char_names, clippy::cast_ptr_alignment)]
|
124 |
fn fill_rect_fast(
|
32 |
#[allow(clippy::many_single_char_names, clippy::cast_ptr_alignment)]
|
33 |
fn blend_rect_fast(
|
138 |
#[allow(clippy::many_single_char_names, clippy::cast_ptr_alignment)]
|
139 |
fn fill_rect_fast(
|
31 |
// `_mm_loadu_si128` performs an unaligned load
|
32 |
#[allow(clippy::cast_ptr_alignment)]
|
33 |
Self {
|
70 |
// `_mm_loadu_si128` performs an unaligned load
|
71 |
#[allow(clippy::cast_ptr_alignment)]
|
72 |
let x = _mm_loadu_si128(x.as_ptr() as *const __m128i);
|
164 |
) -> (u128, bool) {
|
165 |
#[allow(clippy::cast_ptr_alignment)]
|
166 |
// SAFETY: the caller must uphold the safety contract.
|
514 |
) -> (u128, bool) {
|
515 |
#[allow(clippy::cast_ptr_alignment)]
|
516 |
unsafe {
|
459 |
#[allow(clippy::cast_ptr_alignment)]
|
460 |
let token_user = buf.as_ptr() as *const TOKEN_USER;
|
511 |
#[allow(clippy::cast_ptr_alignment)]
|
512 |
let token_groups = buf.as_ptr() as *const TOKEN_GROUPS;
|
187 |
fn as_ref(&self) -> Pin<&'a dyn Binding<T>> {
|
188 |
#[allow(clippy::cast_ptr_alignment)] // that's the actual type, and the alignment is correct
|
189 |
let vtable = unsafe { *(self.data as *const *const ()) };
|
202 |
unsafe fn drop_binding(self) {
|
203 |
#[allow(clippy::cast_ptr_alignment)] // that's the actual type, and the alignment is correct
|
204 |
let vtable = *(self.data as *const *const ());
|
21 |
(4, _) => {
|
22 |
#[allow(clippy::cast_ptr_alignment)]
|
23 |
let chars = unsafe { std::slice::from_raw_parts(bytes.as_ptr() as * const char, bytes.len() / 4) };
|
649 |
#[allow(clippy::cast_ptr_alignment)]
|
650 |
let addrs = unsafe { slice::from_raw_parts(bss.as_ptr() as *const usize, bss.len() / size_of::<usize>()) };
|
21 |
(4, _) => {
|
22 |
#[allow(clippy::cast_ptr_alignment)]
|
23 |
let chars = unsafe { std::slice::from_raw_parts(bytes.as_ptr() as * const char, bytes.len() / 4) };
|
666 |
#[allow(clippy::cast_ptr_alignment)]
|
667 |
let addrs = unsafe { slice::from_raw_parts(bss.as_ptr() as *const usize, bss.len() / size_of::<usize>()) };
|
80 |
while let Some((input_block, output_block)) = iter.next_chunk() {
|
81 |
#[allow(clippy::cast_ptr_alignment)]
|
82 |
let mut data = _mm256_loadu_si256(input_block.as_ptr() as *const __m256i);
|
92 |
};
|
93 |
#[allow(clippy::cast_ptr_alignment)]
|
94 |
_mm256_storeu_si256(output_block.as_mut_ptr() as *mut __m256i, data);
|
68 |
while let Some((input, output)) = iter.next_chunk() {
|
69 |
#[allow(clippy::cast_ptr_alignment)]
|
70 |
let lo_data = _mm_loadu_si128(input.as_ptr() as *const __m128i);
|
71 |
#[allow(clippy::cast_ptr_alignment)]
|
72 |
let hi_data = _mm_loadu_si128(input.as_ptr().add(12) as *const __m128i);
|
73 |
let input = _mm256_set_m128i(hi_data, lo_data);
|
74 |
#[allow(clippy::cast_ptr_alignment)]
|
75 |
_mm256_storeu_si256(output.as_mut_ptr() as *mut __m256i, self.encode_block(input));
|
259 |
// Add to self
|
260 |
#[allow(clippy::cast_ptr_alignment)]
|
261 |
let self_vec = _mm256_loadu_si256((self_avx_ptr as *const __m256i).add(i));
|
262 |
let result = _mm256_xor_si256(self_vec, product);
|
263 |
#[allow(clippy::cast_ptr_alignment)]
|
264 |
_mm256_storeu_si256((self_avx_ptr as *mut __m256i).add(i), result);
|
293 |
let self_neon_ptr = octets.as_mut_ptr();
|
294 |
#[allow(clippy::cast_ptr_alignment)]
|
295 |
let low_table = vld1q_u8(OCTET_MUL_LOW_BITS[scalar.byte() as usize].as_ptr());
|
296 |
#[allow(clippy::cast_ptr_alignment)]
|
297 |
let hi_table = vld1q_u8(OCTET_MUL_HI_BITS[scalar.byte() as usize].as_ptr());
|
300 |
// Multiply by scalar
|
301 |
#[allow(clippy::cast_ptr_alignment)]
|
302 |
let self_vec = vld1q_u8(self_neon_ptr.add(i * mem::size_of::<uint8x16_t>()));
|
112 |
output[0] = 0;
|
113 |
#[allow(clippy::cast_ptr_alignment)]
|
114 |
let value = unsafe { &mut *(&mut output[1] as *mut u8 as *mut InitArgs) };
|
118 |
output[0] = 1;
|
119 |
#[allow(clippy::cast_ptr_alignment)]
|
120 |
let value = unsafe { &mut *(&mut output[1] as *mut u8 as *mut u64) };
|
124 |
output[0] = 2;
|
125 |
#[allow(clippy::cast_ptr_alignment)]
|
126 |
let value = unsafe { &mut *(&mut output[1] as *mut u8 as *mut u64) };
|
161 |
}
|
162 |
#[allow(clippy::cast_ptr_alignment)]
|
163 |
let val: &T = unsafe { &*(&input[1] as *const u8 as *const T) };
|
334 |
}
|
335 |
#[allow(clippy::cast_ptr_alignment)]
|
336 |
let val: &T = unsafe { &*(&input[0] as *const u8 as *const T) };
|
106 |
output[0] = 0;
|
107 |
#[allow(clippy::cast_ptr_alignment)]
|
108 |
let value = unsafe { &mut *(&mut output[1] as *mut u8 as *mut InitArgs) };
|
112 |
output[0] = 1;
|
113 |
#[allow(clippy::cast_ptr_alignment)]
|
114 |
let value = unsafe { &mut *(&mut output[1] as *mut u8 as *mut u64) };
|
118 |
output[0] = 2;
|
119 |
#[allow(clippy::cast_ptr_alignment)]
|
120 |
let value = unsafe { &mut *(&mut output[1] as *mut u8 as *mut u64) };
|
155 |
}
|
156 |
#[allow(clippy::cast_ptr_alignment)]
|
157 |
let val: &T = unsafe { &*(&input[1] as *const u8 as *const T) };
|
334 |
}
|
335 |
#[allow(clippy::cast_ptr_alignment)]
|
336 |
let val: &T = unsafe { &*(&input[0] as *const u8 as *const T) };
|
165 |
#[allow(clippy::cast_ptr_alignment)]
|
166 |
let addrs = unsafe {
|
98 |
// Cast binary data
|
99 |
#[allow(clippy::cast_ptr_alignment)]
|
100 |
let xdatum = (data.data as *const XRecordDatum).as_ref().unwrap();
|
205 |
pub fn raw(&self) -> &T {
|
206 |
#[allow(clippy::cast_ptr_alignment)]
|
207 |
unsafe {
|
212 |
pub fn raw_mut(&mut self) -> &mut T {
|
213 |
#[allow(clippy::cast_ptr_alignment)]
|
214 |
unsafe {
|
84 |
#[cfg(target_family = "windows")]
|
85 |
#[allow(clippy::cast_ptr_alignment)]
|
86 |
{
|
114 |
#[cfg(target_family = "windows")]
|
115 |
#[allow(clippy::cast_ptr_alignment)]
|
116 |
{
|
134 |
#[cfg(target_family = "windows")]
|
135 |
#[allow(clippy::cast_ptr_alignment)]
|
136 |
{
|
156 |
#[cfg(target_family = "windows")]
|
157 |
#[allow(clippy::cast_ptr_alignment)]
|
158 |
{
|
305 |
unsafe {
|
306 |
#[allow(clippy::cast_ptr_alignment)]
|
307 |
let header_ptr = ptr.cast::<Header>();
|
18 |
pub fn new(len: i16) -> Self {
|
19 |
#[allow(clippy::cast_ptr_alignment)]
|
20 |
let ptr = unsafe { alloc::alloc_zeroed(xsqlda_layout(len)) } as *mut ibase::XSQLDA;
|
52 |
/// Constructs a new `Deferred` from a `FnOnce()`.
|
53 |
#[allow(clippy::cast_ptr_alignment)]
|
54 |
pub fn new<F: FnOnce() + 'static>(f: F) -> Self {
|
384 |
//cigar is always aligned to 4 bytes (see extranul above) - so this is safe
|
385 |
#[allow(clippy::cast_ptr_alignment)]
|
386 |
slice::from_raw_parts_mut(data[i..].as_ptr() as *mut u32, cigar_string.len())
|
497 |
//cigar is always aligned to 4 bytes - so this is safe
|
498 |
#[allow(clippy::cast_ptr_alignment)]
|
499 |
unsafe {
|
38 |
// Looks to be a false positive
|
39 |
#[allow(clippy::cast_ptr_alignment)]
|
40 |
impl ReceivePtyMaster {
|
586 |
// a multiple of 4.
|
587 |
#[allow(clippy::cast_ptr_alignment)]
|
588 |
unsafe { ArrayView2::from_shape_ptr(self.shape, self.map.as_ptr() as *const f32) }
|
673 |
// a multiple of 4.
|
674 |
#[allow(clippy::cast_ptr_alignment)]
|
675 |
unsafe {
|
43 |
assert!(mem::align_of::<Node>() <= BLOCK_SIZES[index]);
|
44 |
#[allow(clippy::cast_ptr_alignment)]
|
45 |
let new_node_ptr = ptr as *mut Node;
|
1411 |
unsafe {
|
1412 |
#[allow(clippy::cast_ptr_alignment)]
|
1413 |
let self_ptr = alloc(Layout::new::<Self>()) as *mut Self;
|
1593 |
#[inline(always)]
|
1594 |
#[allow(clippy::cast_ptr_alignment)]
|
1595 |
#[cfg_attr(docs_rs, doc(cfg(target_feature = "sse2")))]
|
2685 |
#[inline(always)]
|
2686 |
#[allow(clippy::cast_ptr_alignment)]
|
2687 |
#[cfg_attr(docs_rs, doc(cfg(target_feature = "sse2")))]
|
608 |
}
|
609 |
#[allow(clippy::cast_ptr_alignment)]
|
610 |
let val: &T = unsafe { &*(&input[1] as *const u8 as *const T) };
|
796 |
#[allow(clippy::cast_ptr_alignment)]
|
797 |
let num_accounts = *(input.add(offset) as *const u64) as usize;
|
806 |
if dup_info == NON_DUP_MARKER {
|
807 |
#[allow(clippy::cast_ptr_alignment)]
|
808 |
let is_signer = *(input.add(offset) as *const u8) != 0;
|
811 |
#[allow(clippy::cast_ptr_alignment)]
|
812 |
let is_writable = *(input.add(offset) as *const u8) != 0;
|
818 |
#[allow(clippy::cast_ptr_alignment)]
|
819 |
let lamports = Rc::new(RefCell::new(&mut *(input.add(offset) as *mut u64)));
|
822 |
#[allow(clippy::cast_ptr_alignment)]
|
823 |
let data_len = *(input.add(offset) as *const u64) as usize;
|
279 |
#[allow(clippy::cast_ptr_alignment)]
|
280 |
let num_accounts = *(input.add(offset) as *const u64) as usize;
|
289 |
if dup_info == NON_DUP_MARKER {
|
290 |
#[allow(clippy::cast_ptr_alignment)]
|
291 |
let is_signer = *(input.add(offset) as *const u8) != 0;
|
294 |
#[allow(clippy::cast_ptr_alignment)]
|
295 |
let is_writable = *(input.add(offset) as *const u8) != 0;
|
298 |
#[allow(clippy::cast_ptr_alignment)]
|
299 |
let executable = *(input.add(offset) as *const u8) != 0;
|
314 |
#[allow(clippy::cast_ptr_alignment)]
|
315 |
let lamports = Rc::new(RefCell::new(&mut *(input.add(offset) as *mut u64)));
|
69 |
#[allow(clippy::cast_ptr_alignment)]
|
70 |
let num_accounts = *(input.add(offset) as *const u64) as usize;
|
79 |
if dup_info == std::u8::MAX {
|
80 |
#[allow(clippy::cast_ptr_alignment)]
|
81 |
let is_signer = *(input.add(offset) as *const u8) != 0;
|
84 |
#[allow(clippy::cast_ptr_alignment)]
|
85 |
let is_writable = *(input.add(offset) as *const u8) != 0;
|
91 |
#[allow(clippy::cast_ptr_alignment)]
|
92 |
let lamports = Rc::new(RefCell::new(&mut *(input.add(offset) as *mut u64)));
|
95 |
#[allow(clippy::cast_ptr_alignment)]
|
96 |
let data_len = *(input.add(offset) as *const u64) as usize;
|
42 |
/// implementation based on glibc (https://github.molgen.mpg.de/git-mirror/glibc/blob/master/sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S)
|
43 |
#[allow(clippy::cast_ptr_alignment)]
|
44 |
#[cfg(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"))]
|
292 |
}
|
293 |
#[allow(clippy::cast_ptr_alignment)]
|
294 |
fn get_string_value(&self, key: &PROPERTYKEY) -> Result<Option<String>, GetPropertyError> {
|
53 |
#[allow(clippy::cast_ptr_alignment)]
|
54 |
let bucket_array_ptr =
|
37 |
// originally derived from `*mut Box<F>`.
|
38 |
#[allow(clippy::cast_ptr_alignment)]
|
39 |
let b: Box<F> = ptr::read(raw as *mut Box<F>);
|
52 |
#[allow(clippy::cast_ptr_alignment)]
|
53 |
let ptr = alloc_zeroed(layout) as *mut Self;
|
68 |
#[allow(clippy::cast_ptr_alignment)]
|
69 |
let ptr = alloc_zeroed(layout) as *mut Self;
|
95 |
);
|
96 |
#[allow(clippy::cast_ptr_alignment)]
|
97 |
let cmsg_data = libc::CMSG_DATA(cmsg_header) as *mut RawFd;
|
144 |
let rawfd_count = (data_byte_count / mem::size_of::<RawFd>()) as isize;
|
145 |
#[allow(clippy::cast_ptr_alignment)]
|
146 |
let fd_ptr = data_ptr as *const RawFd;
|
222 |
}
|
223 |
#[allow(clippy::cast_ptr_alignment)]
|
224 |
let amount = unsafe { *(&input[size_of::<u8>()] as *const u8 as *const u64) };
|
233 |
}
|
234 |
#[allow(clippy::cast_ptr_alignment)]
|
235 |
let m = unsafe { *(&input[1] as *const u8) };
|
241 |
}
|
242 |
#[allow(clippy::cast_ptr_alignment)]
|
243 |
let amount = unsafe { *(&input[size_of::<u8>()] as *const u8 as *const u64) };
|
249 |
}
|
250 |
#[allow(clippy::cast_ptr_alignment)]
|
251 |
let amount = unsafe { *(&input[size_of::<u8>()] as *const u8 as *const u64) };
|
259 |
}
|
260 |
#[allow(clippy::cast_ptr_alignment)]
|
261 |
let amount = unsafe { *(&input[size_of::<u8>()] as *const u8 as *const u64) };
|
271 |
///
|
272 |
#[allow(clippy::cast_ptr_alignment)]
|
273 |
pub fn current() -> Self {
|
180 |
#[allow(clippy::cast_ptr_alignment)]
|
181 |
pub unsafe fn from_raw_sealed_data_t(p: *mut sgx_sealed_data_t, len: u32) -> Option<Self> {
|
47 |
// SAFETY: we use only unaligned loads with this pointer
|
48 |
#[allow(clippy::cast_ptr_alignment)]
|
49 |
let block_ptr = block.as_ptr() as *const __m128i;
|
47 |
// SAFETY: we use only unaligned loads with this pointer
|
48 |
#[allow(clippy::cast_ptr_alignment)]
|
49 |
let block_ptr = block.as_ptr() as *const __m128i;
|
39 |
// we use unaligned loads with `__m128i` pointers
|
40 |
#[allow(clippy::cast_ptr_alignment)]
|
41 |
#[target_feature(enable = "sha,sse2,ssse3,sse4.1")]
|
1161 |
let p = scs::shaderc_result_get_bytes(self.raw);
|
1162 |
#[allow(clippy::cast_ptr_alignment)]
|
1163 |
slice::from_raw_parts(p as *const u32, num_words)
|
25 |
clippy::too_many_lines,
|
26 |
clippy::cast_ptr_alignment,
|
27 |
clippy::cast_possible_wrap,
|
48 |
#[cfg_attr(not(feature = "no-inline"), inline)]
|
49 |
#[allow(clippy::cast_ptr_alignment)]
|
50 |
pub(crate) fn new(ptr: &[u8]) -> Self {
|
178 |
clippy::cast_possible_wrap,
|
179 |
clippy::cast_ptr_alignment,
|
180 |
clippy::uninit_vec
|
45 |
clippy::transmute_ptr_to_ptr,
|
46 |
clippy::cast_ptr_alignment,
|
47 |
clippy::if_not_else,
|
48 |
clippy::cast_ptr_alignment,
|
49 |
clippy::too_many_lines
|
53 |
#[cfg_attr(not(feature = "no-inline"), inline)]
|
54 |
#[allow(clippy::cast_ptr_alignment)]
|
55 |
pub(crate) fn new(ptr: &[u8]) -> Self {
|
186 |
clippy::cast_possible_wrap,
|
187 |
clippy::cast_ptr_alignment,
|
188 |
clippy::uninit_vec
|
65 |
#[cfg_attr(not(feature = "no-inline"), inline)]
|
66 |
#[allow(clippy::cast_ptr_alignment)]
|
67 |
fn is_made_of_eight_digits_fast(chars: &[u8]) -> bool {
|
83 |
clippy::cast_possible_wrap,
|
84 |
clippy::cast_ptr_alignment
|
85 |
)]
|
113 |
#[cfg(any(target_feature = "neon", target_feature = "simd128"))]
|
114 |
#[allow(clippy::cast_ptr_alignment)]
|
115 |
fn parse_eight_digits_unrolled(chars: &[u8]) -> u32 {
|
85 |
#[inline]
|
86 |
#[allow(clippy::cast_ptr_alignment)]
|
87 |
unsafe fn load_from(ptr: *const u8) -> Self {
|
49 |
unsafe fn memcpy_u64(src: &mut *const u8, dest: &mut *mut u8) {
|
50 |
#[allow(clippy::cast_ptr_alignment)]
|
51 |
dest.cast::<u64>()
|
20 |
#[allow(clippy::cast_possible_wrap)]
|
21 |
#[allow(clippy::cast_ptr_alignment)]
|
22 |
unsafe fn from_32_cut_off_leading(
|
64 |
#[allow(clippy::cast_possible_wrap)]
|
65 |
#[allow(clippy::cast_ptr_alignment)]
|
66 |
unsafe fn repeat_16(
|
90 |
#[inline]
|
91 |
#[allow(clippy::cast_ptr_alignment)]
|
92 |
unsafe fn load_from(ptr: *const u8) -> Self {
|
101 |
unsafe fn load_from(ptr: *const u8) -> Self {
|
102 |
#[allow(clippy::cast_ptr_alignment)]
|
103 |
Self::from(_mm256_loadu_si256(ptr.cast::<__m256i>()))
|
97 |
unsafe fn load_from(ptr: *const u8) -> Self {
|
98 |
#[allow(clippy::cast_ptr_alignment)]
|
99 |
Self::from(_mm_loadu_si128(ptr.cast::<__m128i>()))
|
76 |
} else {
|
77 |
#[allow(clippy::cast_ptr_alignment)]
|
78 |
let raw_sockcred = unsafe {
|
99 |
// counter, we need to get the u8 pointer to fRefCnt and interpret it as an i32 pointer.
|
100 |
#[allow(clippy::cast_ptr_alignment)]
|
101 |
fn ref_cnt(&self) -> usize {
|
117 |
impl RefCount for SkNVRefCnt {
|
118 |
#[allow(clippy::cast_ptr_alignment)]
|
119 |
fn ref_cnt(&self) -> usize {
|
149 |
#[allow(clippy::cast_ptr_alignment)]
|
150 |
fn _ref_cnt(&self) -> usize {
|
37 |
// &mut FreeBlock would be undefined behavior.
|
38 |
#[cfg_attr(feature = "cargo-clippy", allow(cast_ptr_alignment))]
|
39 |
let ptr = ptr.as_ptr() as *mut FreeBlock;
|
61 |
assert!(!ptr.is_null(), "failed to allocate Arc");
|
62 |
#[allow(clippy::cast_ptr_alignment)]
|
63 |
ptr::write(ptr as _, AtomicUsize::new(1));
|
191 |
#[allow(clippy::cast_ptr_alignment)]
|
192 |
ptr::write(dst as _, AtomicUsize::new(1));
|
46 |
#[allow(clippy::cast_ptr_alignment)]
|
47 |
let ptr = alloc_zeroed(layout) as *mut Self;
|
62 |
#[allow(clippy::cast_ptr_alignment)]
|
63 |
let ptr = alloc_zeroed(layout) as *mut Self;
|
796 |
#[allow(clippy::cast_ptr_alignment)]
|
797 |
let num_accounts = *(input.add(offset) as *const u64) as usize;
|
806 |
if dup_info == NON_DUP_MARKER {
|
807 |
#[allow(clippy::cast_ptr_alignment)]
|
808 |
let is_signer = *(input.add(offset) as *const u8) != 0;
|
811 |
#[allow(clippy::cast_ptr_alignment)]
|
812 |
let is_writable = *(input.add(offset) as *const u8) != 0;
|
818 |
#[allow(clippy::cast_ptr_alignment)]
|
819 |
let lamports = Rc::new(RefCell::new(&mut *(input.add(offset) as *mut u64)));
|
822 |
#[allow(clippy::cast_ptr_alignment)]
|
823 |
let data_len = *(input.add(offset) as *const u64) as usize;
|
224 |
elems.push(perf_libs::Elems {
|
225 |
#[allow(clippy::cast_ptr_alignment)]
|
226 |
elems: pubkeys.as_ptr() as *const solana_sdk::packet::Packet,
|
354 |
elems.push(perf_libs::Elems {
|
355 |
#[allow(clippy::cast_ptr_alignment)]
|
356 |
elems: pinned_keypair.as_ptr() as *const solana_sdk::packet::Packet,
|
279 |
#[allow(clippy::cast_ptr_alignment)]
|
280 |
let num_accounts = *(input.add(offset) as *const u64) as usize;
|
289 |
if dup_info == NON_DUP_MARKER {
|
290 |
#[allow(clippy::cast_ptr_alignment)]
|
291 |
let is_signer = *(input.add(offset) as *const u8) != 0;
|
294 |
#[allow(clippy::cast_ptr_alignment)]
|
295 |
let is_writable = *(input.add(offset) as *const u8) != 0;
|
298 |
#[allow(clippy::cast_ptr_alignment)]
|
299 |
let executable = *(input.add(offset) as *const u8) != 0;
|
314 |
#[allow(clippy::cast_ptr_alignment)]
|
315 |
let lamports = Rc::new(RefCell::new(&mut *(input.add(offset) as *mut u64)));
|
69 |
#[allow(clippy::cast_ptr_alignment)]
|
70 |
let num_accounts = *(input.add(offset) as *const u64) as usize;
|
79 |
if dup_info == std::u8::MAX {
|
80 |
#[allow(clippy::cast_ptr_alignment)]
|
81 |
let is_signer = *(input.add(offset) as *const u8) != 0;
|
84 |
#[allow(clippy::cast_ptr_alignment)]
|
85 |
let is_writable = *(input.add(offset) as *const u8) != 0;
|
91 |
#[allow(clippy::cast_ptr_alignment)]
|
92 |
let lamports = Rc::new(RefCell::new(&mut *(input.add(offset) as *mut u64)));
|
95 |
#[allow(clippy::cast_ptr_alignment)]
|
96 |
let data_len = *(input.add(offset) as *const u64) as usize;
|
716 |
let ptr = self.result.text_section.as_ptr().add(self.offset_in_text_section);
|
717 |
#[allow(clippy::cast_ptr_alignment)]
|
718 |
ptr::write_unaligned(ptr as *mut T, data as T);
|
357 |
#[allow(clippy::cast_ptr_alignment)]
|
358 |
#[inline]
|
373 |
#[allow(clippy::cast_ptr_alignment)]
|
374 |
#[inline]
|
400 |
#[allow(clippy::cast_ptr_alignment)]
|
401 |
#[inline]
|
1 |
#[allow(clippy::cast_ptr_alignment)]
|
2 |
pub fn words_from_bytes(buf: &[u8]) -> &[u32] {
|
560 |
}
|
561 |
#[allow(clippy::cast_ptr_alignment)]
|
562 |
let val: &T = unsafe { &*(&input[1] as *const u8 as *const T) };
|
344 |
// aligned for VP.
|
345 |
#[allow(clippy::cast_ptr_alignment)]
|
346 |
unsafe {
|
407 |
debug_assert_eq!(0, (p as usize) % mem::align_of::<VP>());
|
408 |
#[allow(clippy::cast_ptr_alignment)]
|
409 |
Some(*(p as *mut VP))
|
6 |
#[allow(clippy::cast_ptr_alignment)] // FIXME seems a bit dodgy
|
7 |
fn main() {
|
6 |
impl Hasher {
|
7 |
#[allow(clippy::cast_ptr_alignment)]
|
8 |
#[target_feature(enable = "avx2")]
|
82 |
#[allow(clippy::cast_ptr_alignment)]
|
83 |
impl Instance {
|
306 |
/// Return a reference to the value as an i32.
|
307 |
#[allow(clippy::cast_ptr_alignment)]
|
308 |
pub unsafe fn as_i32(&self) -> &i32 {
|
312 |
/// Return a mutable reference to the value as an i32.
|
313 |
#[allow(clippy::cast_ptr_alignment)]
|
314 |
pub unsafe fn as_i32_mut(&mut self) -> &mut i32 {
|
318 |
/// Return a reference to the value as a u32.
|
319 |
#[allow(clippy::cast_ptr_alignment)]
|
320 |
pub unsafe fn as_u32(&self) -> &u32 {
|
324 |
/// Return a mutable reference to the value as an u32.
|
325 |
#[allow(clippy::cast_ptr_alignment)]
|
326 |
pub unsafe fn as_u32_mut(&mut self) -> &mut u32 {
|
330 |
/// Return a reference to the value as an i64.
|
331 |
#[allow(clippy::cast_ptr_alignment)]
|
332 |
pub unsafe fn as_i64(&self) -> &i64 {
|
54 |
// does some pointer arithmetic on cmsg_ptr.
|
55 |
#[cfg_attr(feature = "cargo-clippy", allow(cast_ptr_alignment))]
|
56 |
fn get_next_cmsg(msghdr: &msghdr, cmsg: &cmsghdr, cmsg_ptr: *mut cmsghdr) -> *mut cmsghdr {
|
31 |
#[allow(unknown_lints)]
|
32 |
#[allow(clippy::cast_ptr_alignment)]
|
33 |
#[allow(clippy::uninit_vec)]
|
888 |
#[allow(clippy::cast_ptr_alignment)]
|
889 |
fn get_cmd_line_new(handle: &HandleWrapper) -> Vec<String> {
|
221 |
#[allow(clippy::cast_ptr_alignment)]
|
222 |
fn refresh_processes_specifics(&mut self, refresh_kind: ProcessRefreshKind) {
|
224 |
// This is horrible.
|
225 |
#[allow(clippy::cast_ptr_alignment)]
|
226 |
let addr6: *const SOCKADDR_IN6_LH = aptr as *const SOCKADDR_IN6_LH;
|
13 |
// First interpret buffer as sockaddr in order to get sa_family and generic sa_data
|
14 |
#[allow(clippy::cast_ptr_alignment)]
|
15 |
let sockaddr: libc::sockaddr = unsafe { ptr::read_unaligned(self.0.as_ptr() as *const libc::sockaddr) };
|
37 |
// Interpret buffer as sockaddr_un
|
38 |
#[allow(clippy::cast_ptr_alignment)]
|
39 |
let sockaddr: libc::sockaddr_un = unsafe { ptr::read_unaligned(self.0.as_ptr() as *const libc::sockaddr_un) };
|
114 |
#[cfg(any(unix, windows))]
|
115 |
#[allow(clippy::cast_ptr_alignment)]
|
116 |
pub unsafe fn mprotect<T>(memptr: NonNull<T>, prot: Prot::Ty) -> bool {
|
140 |
#[allow(clippy::cast_ptr_alignment)]
|
141 |
pub unsafe fn malloc(size: usize) -> NonNull<u8> {
|
171 |
/// Secure `free`.
|
172 |
#[allow(clippy::cast_ptr_alignment)]
|
173 |
pub unsafe fn free<T>(memptr: NonNull<T>) {
|
251 |
#[cfg(feature = "molc")]
|
252 |
#[allow(clippy::cast_ptr_alignment)]
|
253 |
pub fn decode(data: &[u8]) -> Option<Self> {
|
358 |
#[cfg(feature = "molc")]
|
359 |
#[allow(clippy::cast_ptr_alignment)]
|
360 |
fn decode(data: &[u8]) -> Option<PingPayload> {
|
196 |
// Logic re-used between `supported_input_configs` and `supported_output_configs`.
|
197 |
#[allow(clippy::cast_ptr_alignment)]
|
198 |
fn supported_configs(
|
462 |
impl Device {
|
463 |
#[allow(clippy::cast_ptr_alignment)]
|
464 |
#[allow(clippy::while_immutable_condition)]
|
119 |
let raw_pixels: &[u8] = pixels;
|
120 |
#[allow(clippy::cast_ptr_alignment)]
|
121 |
&*(raw_pixels as *const [u8] as *const [u32])
|
293 |
/// renders out the first 256 tiles in the tile memory into a plain grid
|
294 |
#[allow(clippy::cast_ptr_alignment)]
|
295 |
pub fn render_tile_memory(bitmap: &mut Bitmap, tile_memory: &DMGTileMemory) {
|
330 |
/// Displays an entire screenblock into a Bitmap.
|
331 |
#[allow(clippy::cast_ptr_alignment)]
|
332 |
pub fn render_screen_block(
|
381 |
/// during what would be the "HBlank" periods.
|
382 |
#[allow(clippy::cast_ptr_alignment)]
|
383 |
pub fn dmg_basic_render(
|
494 |
/// to do basically anything it wants.
|
495 |
#[allow(clippy::cast_ptr_alignment)]
|
496 |
pub fn dmg_hblank_render<
|
346 |
for y in 0..height {
|
347 |
#[allow(clippy::cast_ptr_alignment)]
|
348 |
let mut pixel = row_start as *mut u32;
|
46 |
// the allocation backing this pointer ensures the first field in the layout is `usize.
|
47 |
#[allow(clippy::cast_ptr_alignment)]
|
48 |
let group_id_ptr = actual_ptr.cast::<usize>();
|
106 |
// the allocation backing this pointer ensures the first field in the layout is `usize.
|
107 |
#[allow(clippy::cast_ptr_alignment)]
|
108 |
let raw_group_id = actual_ptr.cast::<usize>().read();
|
73 |
/// Will also resolve the filename and symbol version, if available.
|
74 |
#[allow(clippy::cast_ptr_alignment)]
|
75 |
pub fn find_undefined_elf_symbols(buffer: &[u8], elf: &goblin::elf::Elf) -> Vec<UndefinedSymbol> {
|
121 |
#[allow(clippy::cast_ptr_alignment)]
|
122 |
fn u8_to_u32(data: [u8; HASH_SIZE]) -> [u32; HASH_SIZE / 4] {
|
173 |
#[allow(clippy::cast_ptr_alignment)]
|
174 |
pub fn to_data(&self) -> [u32; 16] {
|
684 |
#[target_feature(enable = "sse2")]
|
685 |
#[allow(clippy::cast_ptr_alignment)]
|
686 |
pub(crate) unsafe fn accumulate512(
|
712 |
#[target_feature(enable = "sse2")]
|
713 |
#[allow(clippy::cast_ptr_alignment)]
|
714 |
pub unsafe fn scramble_acc(acc: &mut [u64], key: &[u8]) {
|
168 |
unsafe {
|
169 |
#[allow(clippy::cast_ptr_alignment)]
|
170 |
match marker {
|
60 |
let tx_queue = unsafe {
|
61 |
#[allow(clippy::cast_ptr_alignment)]
|
62 |
&mut *((start + align_up!(mem::size_of::<SharedQueue>(), 64)) as *mut u8
|
87 |
let rx_queue = unsafe {
|
88 |
#[allow(clippy::cast_ptr_alignment)]
|
89 |
&mut *(start as *mut u8 as *mut SharedQueue)
|
262 |
self.selected_queue_num = unsafe {
|
263 |
#[allow(clippy::cast_ptr_alignment)]
|
264 |
*(dest.as_ptr() as *const u16)
|
275 |
let gpa = unsafe {
|
276 |
#[allow(clippy::cast_ptr_alignment)]
|
277 |
*(dest.as_ptr() as *const usize)
|
287 |
let requested_features = unsafe {
|
288 |
#[allow(clippy::cast_ptr_alignment)]
|
289 |
*(dest.as_ptr() as *const u32)
|
30 |
unsafe {
|
31 |
#[allow(clippy::cast_ptr_alignment)]
|
32 |
*(self.mem as *const u16)
|
37 |
unsafe {
|
38 |
#[allow(clippy::cast_ptr_alignment)]
|
39 |
*(self.mem.offset(2) as *const u16)
|
45 |
let new_value = self.index() + 1;
|
46 |
#[allow(clippy::cast_ptr_alignment)]
|
47 |
let write_ptr = self.mem.offset(2) as *mut u16;
|
112 |
pub unsafe fn new(mem: *mut u8, queue_size: usize) -> Self {
|
113 |
#[allow(clippy::cast_ptr_alignment)]
|
114 |
let descriptor_table = mem as *mut VringDescriptor;
|
36 |
/// Create a new probe with no features enabled.
|
37 |
#[allow(clippy::cast_ptr_alignment)]
|
38 |
pub fn new() -> Probe {
|
1453 |
unsafe {
|
1454 |
#[allow(clippy::cast_ptr_alignment)]
|
1455 |
let self_ptr = alloc(Layout::new::<Self>()) as *mut Self;
|
257 |
#[inline(always)]
|
258 |
#[allow(clippy::cast_possible_wrap, clippy::cast_ptr_alignment)]
|
259 |
/// Writes a string with simd-acceleration
|
323 |
#[inline(always)]
|
324 |
#[allow(clippy::cast_possible_wrap, clippy::cast_ptr_alignment)]
|
325 |
/// Writes a string with simd-acceleration
|
58 |
// does some pointer arithmetic on cmsg_ptr.
|
59 |
#[allow(clippy::cast_ptr_alignment)]
|
60 |
fn get_next_cmsg(msghdr: &msghdr, cmsg: &cmsghdr, cmsg_ptr: *mut cmsghdr) -> *mut cmsghdr {
|
61 |
assert!(!ptr.is_null(), "failed to allocate Arc");
|
62 |
#[allow(clippy::cast_ptr_alignment)]
|
63 |
ptr::write(ptr as _, AtomicUsize::new(1));
|
191 |
#[allow(clippy::cast_ptr_alignment)]
|
192 |
ptr::write(dst as _, AtomicUsize::new(1));
|
46 |
#[allow(clippy::cast_ptr_alignment)]
|
47 |
let ptr = alloc_zeroed(layout) as *mut Self;
|
62 |
#[allow(clippy::cast_ptr_alignment)]
|
63 |
let ptr = alloc_zeroed(layout) as *mut Self;
|
453 |
pub fn events(&self) -> &api::Events {
|
454 |
#[allow(clippy::cast_ptr_alignment)]
|
455 |
unsafe {
|
467 |
fn buf_as_api_events(buf: &mut [u8]) -> &mut api::Events {
|
468 |
#[allow(clippy::cast_ptr_alignment)]
|
469 |
unsafe {
|
121 |
// event_type refers to a `SysEx` type.
|
122 |
#[allow(clippy::cast_ptr_alignment)]
|
123 |
let event: &api::SysExEvent = &*(event as *const api::Event as *const api::SysExEvent);
|
871 |
#[allow(clippy::cast_ptr_alignment)]
|
872 |
let num_accounts = *(input.add(offset) as *const u64) as usize;
|
881 |
if dup_info == NON_DUP_MARKER {
|
882 |
#[allow(clippy::cast_ptr_alignment)]
|
883 |
let is_signer = *(input.add(offset) as *const u8) != 0;
|
886 |
#[allow(clippy::cast_ptr_alignment)]
|
887 |
let is_writable = *(input.add(offset) as *const u8) != 0;
|
893 |
#[allow(clippy::cast_ptr_alignment)]
|
894 |
let lamports = Rc::new(RefCell::new(&mut *(input.add(offset) as *mut u64)));
|
897 |
#[allow(clippy::cast_ptr_alignment)]
|
898 |
let data_len = *(input.add(offset) as *const u64) as usize;
|
282 |
#[allow(clippy::cast_ptr_alignment)]
|
283 |
let num_accounts = *(input.add(offset) as *const u64) as usize;
|
292 |
if dup_info == NON_DUP_MARKER {
|
293 |
#[allow(clippy::cast_ptr_alignment)]
|
294 |
let is_signer = *(input.add(offset) as *const u8) != 0;
|
297 |
#[allow(clippy::cast_ptr_alignment)]
|
298 |
let is_writable = *(input.add(offset) as *const u8) != 0;
|
301 |
#[allow(clippy::cast_ptr_alignment)]
|
302 |
let executable = *(input.add(offset) as *const u8) != 0;
|
317 |
#[allow(clippy::cast_ptr_alignment)]
|
318 |
let lamports = Rc::new(RefCell::new(&mut *(input.add(offset) as *mut u64)));
|
69 |
#[allow(clippy::cast_ptr_alignment)]
|
70 |
let num_accounts = *(input.add(offset) as *const u64) as usize;
|
79 |
if dup_info == std::u8::MAX {
|
80 |
#[allow(clippy::cast_ptr_alignment)]
|
81 |
let is_signer = *(input.add(offset) as *const u8) != 0;
|
84 |
#[allow(clippy::cast_ptr_alignment)]
|
85 |
let is_writable = *(input.add(offset) as *const u8) != 0;
|
91 |
#[allow(clippy::cast_ptr_alignment)]
|
92 |
let lamports = Rc::new(RefCell::new(&mut *(input.add(offset) as *mut u64)));
|
95 |
#[allow(clippy::cast_ptr_alignment)]
|
96 |
let data_len = *(input.add(offset) as *const u64) as usize;
|
124 |
/// ```
|
125 |
#[allow(clippy::cast_ptr_alignment)]
|
126 |
pub fn new_with_env<FT, F, T: Send + 'static>(
|
145 |
/// ```
|
146 |
#[allow(clippy::cast_ptr_alignment)]
|
147 |
pub fn new<FT, F>(store: &Store, ty: FT, func: F) -> Self
|
200 |
/// ```
|
201 |
#[allow(clippy::cast_ptr_alignment)]
|
202 |
pub fn new_with_env<FT, F, Env>(store: &Store, ty: FT, env: Env, func: F) -> Self
|
136 |
/// The caller owns the object and should call `wasmer_export_descriptors_destroy` to free it.
|
137 |
#[allow(clippy::cast_ptr_alignment)]
|
138 |
#[no_mangle]
|
152 |
/// Frees the memory for the given export descriptors
|
153 |
#[allow(clippy::cast_ptr_alignment)]
|
154 |
#[no_mangle]
|
163 |
/// Gets the length of the export descriptors
|
164 |
#[allow(clippy::cast_ptr_alignment)]
|
165 |
#[no_mangle]
|
175 |
/// Gets export descriptor by index
|
176 |
#[allow(clippy::cast_ptr_alignment)]
|
177 |
#[no_mangle]
|
191 |
#[no_mangle]
|
192 |
#[allow(clippy::cast_ptr_alignment)]
|
193 |
pub unsafe extern "C" fn wasmer_export_descriptor_name(
|
35 |
/// Gets the value stored by the given Global
|
36 |
#[allow(clippy::cast_ptr_alignment)]
|
37 |
#[no_mangle]
|
44 |
/// Sets the value stored by the given Global
|
45 |
#[allow(clippy::cast_ptr_alignment)]
|
46 |
#[no_mangle]
|
56 |
/// Returns a descriptor (type, mutability) of the given Global
|
57 |
#[allow(clippy::cast_ptr_alignment)]
|
58 |
#[no_mangle]
|
70 |
/// Frees memory for the given Global
|
71 |
#[allow(clippy::cast_ptr_alignment)]
|
72 |
#[no_mangle]
|
71 |
/// See also `wasmer_import_object_append`
|
72 |
#[allow(clippy::cast_ptr_alignment)]
|
73 |
#[no_mangle]
|
61 |
#[allow(clippy::cast_ptr_alignment)]
|
62 |
unsafe fn register_frames(&mut self, eh_frame: &[u8]) {
|
73 |
#[allow(clippy::cast_ptr_alignment)]
|
74 |
pub fn ___build_environment(mut ctx: FunctionEnvMut<EmEnv>, environ: c_int) {
|
97 |
#[allow(clippy::cast_ptr_alignment)]
|
98 |
pub fn _getpwnam(mut ctx: FunctionEnvMut<EmEnv>, name_ptr: c_int) -> c_int {
|
140 |
#[allow(clippy::cast_ptr_alignment)]
|
141 |
pub fn _getgrnam(mut ctx: FunctionEnvMut<EmEnv>, name_ptr: c_int) -> c_int {
|
75 |
#[allow(clippy::cast_ptr_alignment)]
|
76 |
pub fn _getpwnam(mut ctx: FunctionEnvMut<EmEnv>, name_ptr: c_int) -> c_int {
|
111 |
#[allow(clippy::cast_ptr_alignment)]
|
112 |
pub fn _getgrnam(mut ctx: FunctionEnvMut<EmEnv>, name_ptr: c_int) -> c_int {
|
32 |
let view = memory.view(&ctx);
|
33 |
#[allow(clippy::cast_ptr_alignment)]
|
34 |
let ptr = emscripten_memory_pointer!(&view, set) as *mut i32;
|
45 |
let view = memory.view(&ctx);
|
46 |
#[allow(clippy::cast_ptr_alignment)]
|
47 |
let ptr = emscripten_memory_pointer!(&view, set) as *mut i32;
|
30 |
/// getpwuid
|
31 |
#[allow(clippy::cast_ptr_alignment)]
|
32 |
pub fn getpwuid(mut ctx: FunctionEnvMut<EmEnv>, uid: i32) -> i32 {
|
105 |
#[allow(clippy::cast_ptr_alignment)]
|
106 |
pub fn _getgrent(_ctx: FunctionEnvMut<EmEnv>) -> c_int {
|
5 |
#[allow(clippy::cast_ptr_alignment)]
|
6 |
pub fn _sigemptyset(ctx: FunctionEnvMut<EmEnv>, set: u32) -> i32 {
|
72 |
#[allow(clippy::cast_ptr_alignment)]
|
73 |
pub fn ___build_environment(ctx: &EmEnv, environ: c_int) {
|
68 |
#[allow(clippy::cast_ptr_alignment)]
|
69 |
pub fn _getpwnam(ctx: &EmEnv, name_ptr: c_int) -> c_int {
|
108 |
#[allow(clippy::cast_ptr_alignment)]
|
109 |
pub fn _getgrnam(ctx: &EmEnv, name_ptr: c_int) -> c_int {
|
67 |
#[allow(clippy::cast_ptr_alignment)]
|
68 |
pub fn _getpwnam(ctx: &EmEnv, name_ptr: c_int) -> c_int {
|
101 |
#[allow(clippy::cast_ptr_alignment)]
|
102 |
pub fn _getgrnam(ctx: &EmEnv, name_ptr: c_int) -> c_int {
|
30 |
let memory = ctx.memory(0);
|
31 |
#[allow(clippy::cast_ptr_alignment)]
|
32 |
let ptr = emscripten_memory_pointer!(memory, set) as *mut i32;
|
42 |
let memory = ctx.memory(0);
|
43 |
#[allow(clippy::cast_ptr_alignment)]
|
44 |
let ptr = emscripten_memory_pointer!(memory, set) as *mut i32;
|
29 |
/// getpwuid
|
30 |
#[allow(clippy::cast_ptr_alignment)]
|
31 |
pub fn getpwuid(ctx: &EmEnv, uid: i32) -> i32 {
|
104 |
#[allow(clippy::cast_ptr_alignment)]
|
105 |
pub fn _getgrent(_ctx: &EmEnv) -> c_int {
|
4 |
#[allow(clippy::cast_ptr_alignment)]
|
5 |
pub fn _sigemptyset(ctx: &EmEnv, set: u32) -> i32 {
|
72 |
#[allow(clippy::cast_ptr_alignment)]
|
73 |
pub fn ___build_environment(ctx: &EmEnv, environ: c_int) {
|
68 |
#[allow(clippy::cast_ptr_alignment)]
|
69 |
pub fn _getpwnam(ctx: &EmEnv, name_ptr: c_int) -> c_int {
|
108 |
#[allow(clippy::cast_ptr_alignment)]
|
109 |
pub fn _getgrnam(ctx: &EmEnv, name_ptr: c_int) -> c_int {
|
67 |
#[allow(clippy::cast_ptr_alignment)]
|
68 |
pub fn _getpwnam(ctx: &EmEnv, name_ptr: c_int) -> c_int {
|
101 |
#[allow(clippy::cast_ptr_alignment)]
|
102 |
pub fn _getgrnam(ctx: &EmEnv, name_ptr: c_int) -> c_int {
|
30 |
let memory = ctx.memory(0);
|
31 |
#[allow(clippy::cast_ptr_alignment)]
|
32 |
let ptr = emscripten_memory_pointer!(memory, set) as *mut i32;
|
42 |
let memory = ctx.memory(0);
|
43 |
#[allow(clippy::cast_ptr_alignment)]
|
44 |
let ptr = emscripten_memory_pointer!(memory, set) as *mut i32;
|
29 |
/// getpwuid
|
30 |
#[allow(clippy::cast_ptr_alignment)]
|
31 |
pub fn getpwuid(ctx: &EmEnv, uid: i32) -> i32 {
|
104 |
#[allow(clippy::cast_ptr_alignment)]
|
105 |
pub fn _getgrent(_ctx: &EmEnv) -> c_int {
|
4 |
#[allow(clippy::cast_ptr_alignment)]
|
5 |
pub fn _sigemptyset(ctx: &EmEnv, set: u32) -> i32 {
|
60 |
#[allow(clippy::cast_ptr_alignment)]
|
61 |
unsafe fn register_frames(&mut self, eh_frame: &[u8]) {
|
60 |
#[allow(clippy::cast_ptr_alignment)]
|
61 |
unsafe fn register_frames(&mut self, eh_frame: &[u8]) {
|
63 |
#[allow(clippy::cast_ptr_alignment)]
|
64 |
unsafe fn register_frames(&mut self, eh_frame: &[u8]) {
|
59 |
#[allow(clippy::cast_ptr_alignment)]
|
60 |
unsafe fn register_frames(&mut self, eh_frame: &[u8]) {
|
16 |
/// https://llvm.org/doxygen/RTDyldMemoryManager_8cpp_source.html.
|
17 |
#[allow(clippy::cast_ptr_alignment)]
|
18 |
#[cfg(target_os = "macos")]
|
16 |
/// https://llvm.org/doxygen/RTDyldMemoryManager_8cpp_source.html.
|
17 |
#[allow(clippy::cast_ptr_alignment)]
|
18 |
#[cfg(target_os = "macos")]
|
144 |
/// ```
|
145 |
#[allow(clippy::cast_ptr_alignment)]
|
146 |
pub fn new<FT, F>(store: &Store, ty: FT, func: F) -> Self
|
199 |
/// ```
|
200 |
#[allow(clippy::cast_ptr_alignment)]
|
201 |
pub fn new_with_env<FT, F, Env>(store: &Store, ty: FT, env: Env, func: F) -> Self
|
139 |
/// The caller owns the object and should call `wasmer_export_descriptors_destroy` to free it.
|
140 |
#[allow(clippy::cast_ptr_alignment)]
|
141 |
#[no_mangle]
|
155 |
/// Frees the memory for the given export descriptors
|
156 |
#[allow(clippy::cast_ptr_alignment)]
|
157 |
#[no_mangle]
|
166 |
/// Gets the length of the export descriptors
|
167 |
#[allow(clippy::cast_ptr_alignment)]
|
168 |
#[no_mangle]
|
178 |
/// Gets export descriptor by index
|
179 |
#[allow(clippy::cast_ptr_alignment)]
|
180 |
#[no_mangle]
|
194 |
#[no_mangle]
|
195 |
#[allow(clippy::cast_ptr_alignment)]
|
196 |
pub unsafe extern "C" fn wasmer_export_descriptor_name(
|
32 |
/// Gets the value stored by the given Global
|
33 |
#[allow(clippy::cast_ptr_alignment)]
|
34 |
#[no_mangle]
|
41 |
/// Sets the value stored by the given Global
|
42 |
#[allow(clippy::cast_ptr_alignment)]
|
43 |
#[no_mangle]
|
49 |
/// Returns a descriptor (type, mutability) of the given Global
|
50 |
#[allow(clippy::cast_ptr_alignment)]
|
51 |
#[no_mangle]
|
63 |
/// Frees memory for the given Global
|
64 |
#[allow(clippy::cast_ptr_alignment)]
|
65 |
#[no_mangle]
|
57 |
/// See also `wasmer_import_object_append`
|
58 |
#[allow(clippy::cast_ptr_alignment)]
|
59 |
#[no_mangle]
|
275 |
/// This validates all of the locally-defined tables in the Module.
|
276 |
#[allow(clippy::cast_ptr_alignment)]
|
277 |
fn validate_tables(
|
332 |
/// in the right places.
|
333 |
#[allow(clippy::cast_ptr_alignment)]
|
334 |
fn finalize_tables(
|
710 |
#[allow(clippy::cast_ptr_alignment)]
|
711 |
unsafe fn compute_vmctx_deref(vmctx: *const Ctx, seq: &[usize]) -> u64 {
|
275 |
/// This validates all of the locally-defined tables in the Module.
|
276 |
#[allow(clippy::cast_ptr_alignment)]
|
277 |
fn validate_tables(
|
332 |
/// in the right places.
|
333 |
#[allow(clippy::cast_ptr_alignment)]
|
334 |
fn finalize_tables(
|
710 |
#[allow(clippy::cast_ptr_alignment)]
|
711 |
unsafe fn compute_vmctx_deref(vmctx: *const Ctx, seq: &[usize]) -> u64 {
|
275 |
/// This validates all of the locally-defined tables in the Module.
|
276 |
#[allow(clippy::cast_ptr_alignment)]
|
277 |
fn validate_tables(
|
332 |
/// in the right places.
|
333 |
#[allow(clippy::cast_ptr_alignment)]
|
334 |
fn finalize_tables(
|
809 |
#[allow(clippy::cast_ptr_alignment)]
|
810 |
unsafe fn compute_vmctx_deref(vmctx: *const Ctx, seq: &[usize]) -> u64 {
|
81 |
#[allow(clippy::cast_ptr_alignment)]
|
82 |
let instance_ptr = unsafe { alloc::alloc(instance_layout) as *mut Instance };
|
124 |
#[allow(clippy::cast_ptr_alignment)]
|
125 |
impl Instance {
|
737 |
/// be a `VMContext` allocated as part of an `Instance`.
|
738 |
#[allow(clippy::cast_ptr_alignment)]
|
739 |
#[inline]
|
79 |
#[allow(clippy::cast_ptr_alignment)]
|
80 |
let instance_ptr = unsafe { alloc::alloc(instance_layout) as *mut Instance };
|
185 |
#[allow(clippy::cast_ptr_alignment)]
|
186 |
impl Instance {
|
1107 |
/// be a `VMContext` allocated as part of an `Instance`.
|
1108 |
#[allow(clippy::cast_ptr_alignment)]
|
1109 |
#[inline]
|
96 |
#[allow(clippy::cast_ptr_alignment)]
|
97 |
impl Instance {
|
379 |
/// Return a reference to the value as an i32.
|
380 |
#[allow(clippy::cast_ptr_alignment)]
|
381 |
pub unsafe fn as_i32(&self) -> &i32 {
|
385 |
/// Return a mutable reference to the value as an i32.
|
386 |
#[allow(clippy::cast_ptr_alignment)]
|
387 |
pub unsafe fn as_i32_mut(&mut self) -> &mut i32 {
|
391 |
/// Return a reference to the value as a u32.
|
392 |
#[allow(clippy::cast_ptr_alignment)]
|
393 |
pub unsafe fn as_u32(&self) -> &u32 {
|
397 |
/// Return a mutable reference to the value as an u32.
|
398 |
#[allow(clippy::cast_ptr_alignment)]
|
399 |
pub unsafe fn as_u32_mut(&mut self) -> &mut u32 {
|
403 |
/// Return a reference to the value as an i64.
|
404 |
#[allow(clippy::cast_ptr_alignment)]
|
405 |
pub unsafe fn as_i64(&self) -> &i64 {
|
56 |
for (dest, src) in buf.iter_mut().zip(data) {
|
57 |
#[allow(clippy::cast_ptr_alignment)]
|
58 |
let src = unsafe { (src.as_ptr() as *const u32).read_unaligned() };
|
731 |
#[inline(always)]
|
732 |
#[allow(clippy::cast_ptr_alignment)]
|
733 |
pub fn load_unaligned(addr: &i128) -> Self {
|
134 |
pub fn load_quick_unaligned(addr: *const i128) -> Self {
|
135 |
#[allow(clippy::cast_ptr_alignment)]
|
136 |
Self(unsafe { _mm_lddqu_si128(addr as *const _) })
|
33 |
let words = unsafe {
|
34 |
#[allow(clippy::cast_ptr_alignment)]
|
35 |
slice::from_raw_parts(val.bytes.as_ptr() as *const u16, val.bytes.len() / 2)
|
74 |
let mut words = unsafe {
|
75 |
#[allow(clippy::cast_ptr_alignment)]
|
76 |
slice::from_raw_parts(val.bytes.as_ptr() as *const u16, val.bytes.len() / 2)
|
112 |
match val.vtype {
|
113 |
#[allow(clippy::cast_ptr_alignment)]
|
114 |
REG_DWORD => Ok(unsafe { *(val.bytes.as_ptr() as *const u32) }),
|
122 |
match val.vtype {
|
123 |
#[allow(clippy::cast_ptr_alignment)]
|
124 |
REG_QWORD => Ok(unsafe { *(val.bytes.as_ptr() as *const u64) }),
|
245 |
debug!("POKE @ {:08x} -> {:08x}", addr, value);
|
246 |
#[allow(clippy::cast_ptr_alignment)]
|
247 |
let memory_range = mem.as_mut_ptr() as *mut u32;
|
252 |
fn do_peek_32(mem: &mut MmapMut, addr: u32) -> Result<u32, BridgeError> {
|
253 |
#[allow(clippy::cast_ptr_alignment)]
|
254 |
let memory_range = mem.as_mut_ptr() as *mut u32;
|
80 |
#[allow(clippy::cast_ptr_alignment)]
|
81 |
fn addr(&self) -> Option<IpAddr> {
|
4067 |
#[allow(clippy::cast_ptr_alignment)]
|
4068 |
pub fn ref_id(&self) -> Option<i64> {
|
472 |
// correctly (if malloc() returned an aligned chunk, which it does).
|
473 |
#[allow(clippy::cast_ptr_alignment)]
|
474 |
let fd_ptr = (unsafe { buffer.as_ptr().add(buffer.len()) }) as *const RawFd;
|
53 |
// The pointer is suitable aligned since our xcb_connect() mock above created it
|
54 |
#[allow(clippy::cast_ptr_alignment)]
|
55 |
((*(c as *const ConnectionMock)).setup.as_ptr() as _)
|
64 |
// The pointer is suitable aligned since our xcb_connect() mock above created it
|
65 |
#[allow(clippy::cast_ptr_alignment)]
|
66 |
(*(c as *const ConnectionMock)).error
|
70 |
// The pointer is suitable aligned since our xcb_connect() mock above created it
|
71 |
#[allow(clippy::cast_ptr_alignment)]
|
72 |
let _ = Box::from_raw(c as *mut ConnectionMock);
|
229 |
Layout::from_size_align(size.try_into().unwrap(), mem::align_of::<u8>()).unwrap();
|
230 |
#[allow(clippy::cast_ptr_alignment)]
|
231 |
let buffer = unsafe { alloc_zeroed(layout) as *mut c_uint };
|
41 |
///
|
42 |
#[allow(clippy::cast_ptr_alignment, clippy::unreadable_literal)]
|
43 |
#[doc(hidden)]
|
63 |
/// Like above but with 32 byte slices
|
64 |
#[allow(clippy::cast_ptr_alignment, clippy::unreadable_literal)]
|
65 |
#[doc(hidden)]
|
334 |
if status == i32::from(xlib::Success) && !prop_return.is_null() {
|
335 |
#[allow(clippy::cast_lossless, clippy::cast_ptr_alignment)]
|
336 |
let ptr = prop_return as *const c_ulong;
|
450 |
unsafe {
|
451 |
#[allow(clippy::cast_lossless, clippy::cast_ptr_alignment)]
|
452 |
let pid = *prop_return.cast::<u32>();
|
503 |
if status == i32::from(xlib::Success) && !prop_return.is_null() {
|
504 |
#[allow(clippy::cast_lossless, clippy::cast_ptr_alignment)]
|
505 |
let ptr = prop_return as *const c_ulong;
|
535 |
{
|
536 |
#[allow(clippy::cast_lossless, clippy::cast_ptr_alignment)]
|
537 |
let atom_ = unsafe { *prop_return.cast::<xlib::Atom>() };
|
711 |
unsafe {
|
712 |
#[allow(clippy::cast_ptr_alignment)]
|
713 |
let array_ptr = prop_return.cast::<c_long>();
|
9 |
clippy::many_single_char_names,
|
10 |
clippy::cast_ptr_alignment
|
11 |
)]
|
8 |
clippy::many_single_char_names,
|
9 |
clippy::cast_ptr_alignment
|
10 |
)]
|
1 |
//! This is code from [Tungstenite project](https://github.com/snapview/tungstenite-rs)
|
2 |
#![allow(clippy::cast_ptr_alignment)]
|
3 |
use std::ptr::copy_nonoverlapping;
|
4 |
// This is a really annoying clippy lint, since it's required for so many cases...
|
5 |
clippy::cast_ptr_alignment,
|
6 |
// For macros
|
4 |
// This is a really annoying clippy lint, since it's required for so many cases...
|
5 |
clippy::cast_ptr_alignment,
|
6 |
// For macros
|
1 |
#![allow(clippy::cast_ptr_alignment)]
|
1 |
#![allow(clippy::cast_ptr_alignment)]
|
1 |
#![allow(clippy::cast_ptr_alignment)]
|
2 |
extern crate proc_macro;
|
1 |
#![allow(clippy::cast_ptr_alignment)]
|
1 |
#![allow(clippy::cast_ptr_alignment)]
|
1 |
#![allow(clippy::cast_ptr_alignment)]
|
48 |
clippy::cast_possible_wrap,
|
49 |
clippy::cast_ptr_alignment,
|
50 |
clippy::missing_panics_doc,
|
59 |
clippy::cast_possible_wrap,
|
60 |
clippy::cast_ptr_alignment,
|
61 |
clippy::missing_panics_doc,
|
59 |
clippy::cast_possible_wrap,
|
60 |
clippy::cast_ptr_alignment,
|
61 |
clippy::missing_panics_doc,
|
56 |
clippy::cast_possible_wrap,
|
57 |
clippy::cast_ptr_alignment,
|
58 |
clippy::missing_panics_doc,
|
6 |
clippy::cast_precision_loss,
|
7 |
clippy::cast_ptr_alignment,
|
8 |
clippy::cast_sign_loss,
|
1 |
#![allow(clippy::many_single_char_names)]
|
2 |
#![allow(clippy::cast_ptr_alignment)] // Safe to cast without alignment checks as the loads and stores do not require alignment.
|
1 |
#![allow(clippy::cast_ptr_alignment)]
|
1 |
#![allow(clippy::cast_ptr_alignment)]
|
1 |
// We manually ensure alignment of reads in this file.
|
2 |
#![allow(clippy::cast_ptr_alignment)]
|
1 |
// We manually ensure alignment of reads in this file.
|
2 |
#![allow(clippy::cast_ptr_alignment)]
|
1 |
// We manually ensure alignment of reads in this file.
|
2 |
#![allow(clippy::cast_ptr_alignment)]
|
1 |
//! This is code from [Tungstenite project](https://github.com/snapview/tungstenite-rs)
|
2 |
#![allow(clippy::cast_ptr_alignment)]
|
3 |
use std::ptr::copy_nonoverlapping;
|
1 |
#![allow(clippy::cast_ptr_alignment)]
|
2 |
//! trait](../trait.SharedLibrary.html).
|
3 |
#![allow(clippy::cast_ptr_alignment)]
|
5 |
clippy::missing_panics_doc,
|
6 |
clippy::cast_ptr_alignment,
|
7 |
clippy::module_name_repetitions,
|
3 |
#![allow(clippy::cast_ptr_alignment)]
|
3 |
#![allow(clippy::cast_ptr_alignment)]
|
3 |
#![allow(clippy::cast_ptr_alignment)]
|
36 |
pub fn set_addr<T: IsA<gio::SocketAddress>>(&mut self, addr: &T) {
|
37 |
#![allow(clippy::cast_ptr_alignment)]
|
38 |
unsafe {
|
3 |
#![allow(clippy::cast_ptr_alignment)]
|
3 |
#![allow(clippy::cast_ptr_alignment)]
|
3 |
#![allow(clippy::cast_ptr_alignment)]
|
547 |
pub fn set_overlay(&mut self, overlay: &crate::VideoOverlayComposition) {
|
548 |
#![allow(clippy::cast_ptr_alignment)]
|
549 |
unsafe {
|
572 |
pub fn set_tc(&mut self, tc: ValidVideoTimeCode) {
|
573 |
#![allow(clippy::cast_ptr_alignment)]
|
574 |
unsafe {
|
66 |
// which is u32-aligned.
|
67 |
#![allow(clippy::cast_ptr_alignment)]
|
68 |
let (len, final_ptr) = match ptr as usize {
|
91 |
// which is u32-aligned.
|
92 |
#![allow(clippy::cast_ptr_alignment)]
|
432 |
// The BSTR pointers should be u32-aligned.
|
433 |
#![allow(clippy::cast_ptr_alignment)]
|
434 |
if pbstr.is_null() {
|
1 |
#![allow(clippy::cast_ptr_alignment)]
|
3 |
#![allow(
|
4 |
clippy::cast_ptr_alignment,
|
5 |
clippy::identity_op,
|
25 |
unsafe fn write_real_alloc(p: *mut u8, size: usize) -> *mut c_void {
|
26 |
#![allow(clippy::cast_ptr_alignment)]
|
27 |
// it's ok to cast it as *mut AllocUnit=usize because we align to it during allocation and p points to the beginning of that buffer
|
18 |
// Discarded lints
|
19 |
#![allow(clippy::cast_ptr_alignment)]
|
293 |
mod tests {
|
294 |
#![allow(clippy::cast_ptr_alignment, clippy::shadow_unrelated)]
|
295 |
use super::{type_coerce, MetaType, Slice, TraitObject, Type};
|
2983 |
mod link {
|
2984 |
#![allow(clippy::cast_ptr_alignment)]
|
12 |
#![warn(unused_attributes)]
|
13 |
#![allow(bad_style, deprecated, overflowing_literals, unused_macros, clippy::cast_lossless, clippy::cast_ptr_alignment, clippy::len_without_is_empty, clippy::trivially_copy_pass_by_ref, clippy::unreadable_literal)]
|
14 |
#[doc(hidden)]
|
1 |
//! This is code from [Tungstenite project](https://github.com/snapview/tungstenite-rs)
|
2 |
#![allow(clippy::cast_ptr_alignment)]
|
3 |
use std::ptr::copy_nonoverlapping;
|
5 |
#![cfg_attr(feature = "cargo-clippy", allow(trivially_copy_pass_by_ref))] // API requirement
|
6 |
#![cfg_attr(feature = "cargo-clippy", allow(cast_ptr_alignment))] // required by allocator
|
7 |
#![cfg_attr(feature = "cargo-clippy", allow(non_upper_case_globals))]
|
5 |
#![cfg_attr(feature = "cargo-clippy", allow(trivially_copy_pass_by_ref))] // API requirement
|
6 |
#![cfg_attr(feature = "cargo-clippy", allow(cast_ptr_alignment))] // required by allocator
|
7 |
#![cfg_attr(feature = "cargo-clippy", allow(non_upper_case_globals))]
|
1 |
#![allow(clippy::cast_ptr_alignment, clippy::module_inception)]
|
94 |
#![allow(clippy::cast_ptr_alignment, clippy::module_inception)]
|
15 |
#![allow(clippy::cast_ptr_alignment)]
|
25 |
#![warn(missing_docs)]
|
26 |
#![allow(clippy::cast_ptr_alignment, clippy::cast_ref_to_mut)]
|
23 |
#![allow(clippy::missing_safety_doc)]
|
24 |
#![allow(clippy::cast_ptr_alignment)]
|
14 |
#![allow(clippy::unreadable_literal)]
|
15 |
#![allow(clippy::cast_ptr_alignment)]
|
16 |
#![allow(clippy::mut_from_ref)]
|
24 |
#![warn(missing_docs)]
|
25 |
#![allow(clippy::cast_ptr_alignment)]
|
26 |
#![feature(result_flattening)]
|
11 |
#![allow(clippy::cast_lossless)]
|
12 |
#![allow(clippy::cast_ptr_alignment)]
|
13 |
#![allow(clippy::cognitive_complexity)]
|
11 |
#![allow(clippy::cast_lossless)]
|
12 |
#![allow(clippy::cast_ptr_alignment)]
|
13 |
#![allow(clippy::cognitive_complexity)]
|
38 |
#![allow(clippy::cast_lossless)]
|
39 |
#![allow(clippy::cast_ptr_alignment)]
|
40 |
#![allow(clippy::cognitive_complexity)]
|
50 |
#![allow(clippy::cast_lossless)]
|
51 |
#![allow(clippy::cast_ptr_alignment)]
|
1 |
//! This is code from [Tungstenite project](https://github.com/snapview/tungstenite-rs)
|
2 |
#![allow(clippy::cast_ptr_alignment)]
|
3 |
use std::ptr::copy_nonoverlapping;
|
1 |
#![allow(clippy::cast_ptr_alignment)]
|
1 |
#![allow(clippy::cast_ptr_alignment)]
|
1 |
#![allow(clippy::cast_ptr_alignment)]
|
1 |
//! This is code from [Tungstenite project](https://github.com/snapview/tungstenite-rs)
|
2 |
#![allow(clippy::cast_ptr_alignment)]
|
3 |
use std::ptr::copy_nonoverlapping;
|
1 |
#![allow(clippy::cast_ptr_alignment)] // Safe to cast without alignment checks as the loads and stores do not require alignment.
|
1 |
#![allow(clippy::many_single_char_names)]
|
2 |
#![allow(clippy::cast_ptr_alignment)] // Safe to cast without alignment checks as the loads and stores do not require alignment.
|
1 |
#![allow(unaligned_references)]
|
2 |
#![allow(clippy::cast_ptr_alignment)]
|
260 |
clippy::cast_possible_wrap,
|
261 |
clippy::cast_ptr_alignment,
|
262 |
clippy::default_trait_access,
|
30 |
//! and calling by t1ha0_funcptr is not available and/or expensive.
|
31 |
#![allow(clippy::cast_ptr_alignment, clippy::many_single_char_names)]
|
1 |
#![allow(clippy::cast_ptr_alignment, clippy::many_single_char_names)]
|
13 |
//! that was initially planned to providing a bit more quality.
|
14 |
#![allow(clippy::cast_ptr_alignment, clippy::many_single_char_names)]
|
1 |
#![allow(clippy::cast_ptr_alignment)]
|
13 |
#![allow(clippy::unreadable_literal)]
|
14 |
#![allow(clippy::cast_ptr_alignment)]
|
15 |
#![allow(clippy::mut_from_ref)]
|
15 |
clippy::cast_possible_wrap,
|
16 |
clippy::cast_ptr_alignment,
|
17 |
clippy::cast_sign_loss,
|
1 |
#![allow(clippy::cast_ptr_alignment)]
|
11 |
#![allow(clippy::cast_lossless)]
|
12 |
#![allow(clippy::cast_ptr_alignment)]
|
13 |
#![allow(clippy::cognitive_complexity)]
|
19 |
#![allow(clippy::cast_ptr_alignment)]
|
3 |
#![allow(clippy::cast_ptr_alignment)]
|
3 |
#![allow(clippy::cast_ptr_alignment)]
|
3 |
#![allow(clippy::cast_ptr_alignment)]
|
3 |
#![allow(clippy::cast_ptr_alignment)]
|
3 |
#![allow(clippy::cast_ptr_alignment)]
|
1 |
#![allow(clippy::cast_ptr_alignment)]
|
192 |
pub mod signal {
|
193 |
#![allow(clippy::cast_ptr_alignment, clippy::missing_safety_doc)]
|
194 |
#[cfg(feature = "dlopen")]
|
1 |
#![allow(clippy::missing_safety_doc)]
|
2 |
#![allow(clippy::cast_ptr_alignment)]
|