summary refs log tree commit diff stats
path: root/rust/hw/timer
diff options
context:
space:
mode:
Diffstat (limited to 'rust/hw/timer')
-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 d4364f2f2f..b7a1be05de 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,