Skip to content

Commit 261b6b5

Browse files
authored
minor: fix mutable reference warning in examples (#2631)
1 parent dfd5609 commit 261b6b5

File tree

1 file changed

+3
-1
lines changed
  • fuzzers/inprocess/dynamic_analysis/src

1 file changed

+3
-1
lines changed

fuzzers/inprocess/dynamic_analysis/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ use std::{
1111
io::{self, Read, Write},
1212
path::PathBuf,
1313
process,
14+
ptr::addr_of_mut,
1415
};
1516

1617
use clap::{Arg, Command};
@@ -252,7 +253,8 @@ fn fuzz(
252253
// Create an observation channel to keep track of the execution time
253254
let time_observer = TimeObserver::new("time");
254255

255-
let func_list = unsafe { OwnedMutPtr::from_raw_mut(Lazy::force_mut(&mut FUNCTION_LIST)) };
256+
let func_list =
257+
unsafe { OwnedMutPtr::from_raw_mut(Lazy::force_mut(&mut *addr_of_mut!(FUNCTION_LIST))) };
256258
let profiling_observer = ProfilingObserver::new("concatenated.json", func_list)?;
257259
let callhook = CallHook::new();
258260

0 commit comments

Comments
 (0)