Fix some warnings
This commit is contained in:
7
build.rs
7
build.rs
@@ -102,7 +102,12 @@ mod gen {
|
||||
|
||||
match src {
|
||||
Ok(v) => fill_from_location(&mut f, Path::new(&v)).unwrap(),
|
||||
Err(e) => println!("cargo:warning=location not found: {}, please set proper INITFS_FOLDER.", e),
|
||||
Err(e) => {
|
||||
f.write_all(
|
||||
b" files.clear();" // Silence mutability warning
|
||||
).unwrap();
|
||||
println!("cargo:warning=location not found: {}, please set proper INITFS_FOLDER.", e);
|
||||
}
|
||||
}
|
||||
|
||||
f.write_all(b" files
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
use syscall::io::{Io, Pio};
|
||||
use time;
|
||||
|
||||
use acpi;
|
||||
|
||||
pub fn init() {
|
||||
let mut rtc = Rtc::new();
|
||||
time::START.lock().0 = rtc.time();
|
||||
@@ -50,11 +48,11 @@ impl Rtc {
|
||||
let mut century;
|
||||
let register_b;
|
||||
|
||||
let century_register = if let Some(ref fadt) = acpi::ACPI_TABLE.lock().fadt {
|
||||
/*let century_register = if let Some(ref fadt) = acpi::ACPI_TABLE.lock().fadt {
|
||||
Some(fadt.century)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
};*/
|
||||
|
||||
unsafe {
|
||||
self.wait();
|
||||
|
||||
@@ -43,6 +43,7 @@ impl BumpAllocator {
|
||||
}
|
||||
|
||||
impl FrameAllocator for BumpAllocator {
|
||||
#[allow(unused)]
|
||||
fn set_noncore(&mut self, noncore: bool) {}
|
||||
|
||||
fn free_frames(&self) -> usize {
|
||||
|
||||
@@ -5,7 +5,7 @@ use collections::Vec;
|
||||
|
||||
use paging::PhysicalAddress;
|
||||
|
||||
use super::{Frame, FrameAllocator, MemoryArea, MemoryAreaIter};
|
||||
use super::{Frame, FrameAllocator};
|
||||
|
||||
pub struct RecycleAllocator<T: FrameAllocator> {
|
||||
inner: T,
|
||||
|
||||
@@ -130,7 +130,7 @@ pub unsafe fn init(cpu_id: usize, stack_start: usize, stack_end: usize) -> (Acti
|
||||
for page in Page::range_inclusive(start_page, end_page) {
|
||||
let result = mapper.map(page, PRESENT | GLOBAL | NO_EXECUTE | WRITABLE);
|
||||
// The flush can be ignored as this is not the active table. See later active_table.switch
|
||||
unsafe { result.ignore(); }
|
||||
result.ignore();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ pub unsafe fn init(cpu_id: usize, stack_start: usize, stack_end: usize) -> (Acti
|
||||
let page = Page::containing_address(VirtualAddress::new(frame.start_address().get() + ::KERNEL_OFFSET));
|
||||
let result = mapper.map_to(page, frame, flags);
|
||||
// The flush can be ignored as this is not the active table. See later active_table.switch
|
||||
unsafe { result.ignore(); }
|
||||
result.ignore();
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -206,7 +206,7 @@ pub unsafe fn init_ap(cpu_id: usize, bsp_table: usize, stack_start: usize, stack
|
||||
for page in Page::range_inclusive(start_page, end_page) {
|
||||
let result = mapper.map(page, PRESENT | GLOBAL | NO_EXECUTE | WRITABLE);
|
||||
// The flush can be ignored as this is not the active table. See later active_table.switch
|
||||
unsafe { result.ignore(); }
|
||||
result.ignore();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@ pub unsafe fn init_ap(cpu_id: usize, bsp_table: usize, stack_start: usize, stack
|
||||
let page = Page::containing_address(VirtualAddress::new(frame.start_address().get() + ::KERNEL_OFFSET));
|
||||
let result = mapper.map_to(page, frame, flags);
|
||||
// The flush can be ignored as this is not the active table. See later active_table.switch
|
||||
unsafe { result.ignore(); }
|
||||
result.ignore();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user