add ptr_offset_by_literal clippy lint and set to deny

This commit is contained in:
auronandace
2026-07-06 12:40:43 +01:00
parent 9930a90de0
commit bf6dc24407
15 changed files with 51 additions and 50 deletions
+4 -4
View File
@@ -127,12 +127,12 @@ pub unsafe extern "C" fn utimes(path: *const c_char, times: *const timeval) -> c
} else {
Some([
timespec {
tv_sec: unsafe { (*times.offset(0)).tv_sec },
tv_nsec: c_long::from(unsafe { (*times.offset(0)).tv_usec }) * 1000,
tv_sec: unsafe { (*times).tv_sec },
tv_nsec: c_long::from(unsafe { (*times).tv_usec }) * 1000,
},
timespec {
tv_sec: unsafe { (*times.offset(1)).tv_sec },
tv_nsec: c_long::from(unsafe { (*times.offset(1)).tv_usec }) * 1000,
tv_sec: unsafe { (*times.add(1)).tv_sec },
tv_nsec: c_long::from(unsafe { (*times.add(1)).tv_usec }) * 1000,
},
])
};