mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Add missing unsafe in code example
This commit is contained in:
@@ -571,7 +571,9 @@ fn kernel_main(boot_info: &'static BootInfo) -> ! {
|
||||
|
||||
for &address in &addresses {
|
||||
let virt = VirtAddr::new(address);
|
||||
let phys = translate_addr(virt, boot_info.physical_memory_offset);
|
||||
let phys = unsafe {
|
||||
translate_addr(virt, boot_info.physical_memory_offset)
|
||||
};
|
||||
println!("{:?} -> {:?}", virt, phys);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user