Fix more warnings

This commit is contained in:
Jeremy Soller
2022-07-29 18:53:12 -06:00
parent 23d4995e50
commit e9950ee6da
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ impl Arch for X86Arch {
asm!("mov cr3, {0}", in(reg) address.data());
}
fn virt_is_valid(address: VirtualAddress) -> bool {
fn virt_is_valid(_address: VirtualAddress) -> bool {
// On 32-bit x86, every virtual address is valid
true
}
+3 -2
View File
@@ -125,11 +125,12 @@ impl<A: Arch, F: FrameAllocator> PageMapper<A, F> {
Some(flush)
}
pub unsafe fn unmap_phys(&mut self, virt: VirtualAddress, unmap_parents: bool) -> Option<(PhysicalAddress, PageFlags<A>, PageFlush<A>)> {
pub unsafe fn unmap_phys(&mut self, virt: VirtualAddress, _unmap_parents: bool) -> Option<(PhysicalAddress, PageFlags<A>, PageFlush<A>)> {
//TODO: verify virt is aligned
let mut table = self.table();
let level = table.level();
unmap_phys_inner(virt, &mut table, level, unmap_parents, &mut self.allocator).map(|(pa, pf)| (pa, pf, PageFlush::new(virt)))
//TODO: use unmap_parents
unmap_phys_inner(virt, &mut table, level, false, &mut self.allocator).map(|(pa, pf)| (pa, pf, PageFlush::new(virt)))
}
}
unsafe fn unmap_phys_inner<A: Arch>(virt: VirtualAddress, table: &mut PageTable<A>, initial_level: usize, unmap_parents: bool, allocator: &mut impl FrameAllocator) -> Option<(PhysicalAddress, PageFlags<A>)> {