aboutsummaryrefslogtreecommitdiff
path: root/rust/hw
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-02-14 11:34:44 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2025-05-06 16:02:04 +0200
commit5df3fe062fb0be9a6689dc0336087b214dd30e5c (patch)
treeede1f7523ac32b4f7e389665255f2116546dca9d /rust/hw
parent3a1c694d74deb478d9822e585e90c5903852eb84 (diff)
downloadqemu-5df3fe062fb0be9a6689dc0336087b214dd30e5c.zip
qemu-5df3fe062fb0be9a6689dc0336087b214dd30e5c.tar.gz
qemu-5df3fe062fb0be9a6689dc0336087b214dd30e5c.tar.bz2
rust: enable clippy::ptr_cast_constness
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/hw')
-rw-r--r--rust/hw/timer/hpet/src/hpet.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/hw/timer/hpet/src/hpet.rs b/rust/hw/timer/hpet/src/hpet.rs
index d4364f2..b7a1be0 100644
--- a/rust/hw/timer/hpet/src/hpet.rs
+++ b/rust/hw/timer/hpet/src/hpet.rs
@@ -219,7 +219,7 @@ impl HPETTimer {
// SAFETY: the HPETTimer will only be used after the timer
// is initialized below.
qemu_timer: unsafe { Timer::new() },
- state: NonNull::new(state as *const _ as *mut _).unwrap(),
+ state: NonNull::new((state as *const HPETState).cast_mut()).unwrap(),
config: 0,
cmp: 0,
fsb: 0,