Skip to content

Commit 7ec29e1

Browse files
committed
fix(test): static_mut_refs
Signed-off-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
1 parent e0775db commit 7ec29e1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

testing/src/gdt.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use core::ptr;
12
use lazy_static::lazy_static;
23
use x86_64::structures::gdt::{Descriptor, GlobalDescriptorTable, SegmentSelector};
34
use x86_64::structures::tss::TaskStateSegment;
@@ -12,7 +13,7 @@ lazy_static! {
1213
const STACK_SIZE: usize = 4096;
1314
static mut STACK: [u8; STACK_SIZE] = [0; STACK_SIZE];
1415

15-
let stack_start = VirtAddr::from_ptr(unsafe { &STACK });
16+
let stack_start = VirtAddr::from_ptr(unsafe { ptr::addr_of!(STACK) });
1617
let stack_end = stack_start + STACK_SIZE as u64;
1718
stack_end
1819
};

0 commit comments

Comments
 (0)