Remove warnings

This commit is contained in:
Jeremy Soller 2016-08-17 16:54:48 -06:00
parent 78432b3875
commit b756dd59eb
6 changed files with 8 additions and 10 deletions

View file

@ -2,9 +2,7 @@
//! Code to parse the ACPI tables //! Code to parse the ACPI tables
use core::intrinsics::{atomic_load, atomic_store}; use core::intrinsics::{atomic_load, atomic_store};
use x86::controlregs;
use allocator::{HEAP_START, HEAP_SIZE};
use memory::Frame; use memory::Frame;
use paging::{entry, ActivePageTable, Page, PhysicalAddress, VirtualAddress}; use paging::{entry, ActivePageTable, Page, PhysicalAddress, VirtualAddress};
use start::kstart_ap; use start::kstart_ap;

View file

@ -4,7 +4,7 @@
use core::marker::PhantomData; use core::marker::PhantomData;
use core::ops::{Index, IndexMut}; use core::ops::{Index, IndexMut};
use memory::{allocate_frame, deallocate_frame}; use memory::allocate_frame;
use super::entry::*; use super::entry::*;
use super::ENTRY_COUNT; use super::ENTRY_COUNT;

View file

@ -1,7 +1,7 @@
//! Temporarily map a page //! Temporarily map a page
//! From [Phil Opp's Blog](http://os.phil-opp.com/remap-the-kernel.html) //! From [Phil Opp's Blog](http://os.phil-opp.com/remap-the-kernel.html)
use memory::{Frame, FrameAllocator}; use memory::Frame;
use super::{ActivePageTable, Page, VirtualAddress}; use super::{ActivePageTable, Page, VirtualAddress};
use super::entry::EntryFlags; use super::entry::EntryFlags;

View file

@ -8,7 +8,7 @@ use allocator::{HEAP_START, HEAP_SIZE};
use externs::memset; use externs::memset;
use gdt; use gdt;
use idt; use idt;
use memory::{self, FrameAllocator}; use memory;
use paging::{self, entry, Page, VirtualAddress}; use paging::{self, entry, Page, VirtualAddress};
/// Test of zero values in BSS. /// Test of zero values in BSS.

View file

@ -5,7 +5,7 @@ use super::Scheme;
pub struct DebugScheme; pub struct DebugScheme;
impl Scheme for DebugScheme { impl Scheme for DebugScheme {
fn open(&mut self, path: &[u8], flags: usize) -> Result<usize> { fn open(&mut self, path: &[u8], _flags: usize) -> Result<usize> {
println!("DebugScheme::open: {}", unsafe { str::from_utf8_unchecked(path) }); println!("DebugScheme::open: {}", unsafe { str::from_utf8_unchecked(path) });
Ok(0) Ok(0)
} }
@ -13,21 +13,21 @@ impl Scheme for DebugScheme {
/// Read the file `number` into the `buffer` /// Read the file `number` into the `buffer`
/// ///
/// Returns the number of bytes read /// Returns the number of bytes read
fn read(&mut self, file: usize, buffer: &mut [u8]) -> Result<usize> { fn read(&mut self, _file: usize, _buffer: &mut [u8]) -> Result<usize> {
Ok(0) Ok(0)
} }
/// Write the `buffer` to the `file` /// Write the `buffer` to the `file`
/// ///
/// Returns the number of bytes written /// Returns the number of bytes written
fn write(&mut self, file: usize, buffer: &[u8]) -> Result<usize> { fn write(&mut self, _file: usize, buffer: &[u8]) -> Result<usize> {
//TODO: Write bytes, do not convert to str //TODO: Write bytes, do not convert to str
print!("{}", unsafe { str::from_utf8_unchecked(buffer) }); print!("{}", unsafe { str::from_utf8_unchecked(buffer) });
Ok(buffer.len()) Ok(buffer.len())
} }
/// Close the file `number` /// Close the file `number`
fn close(&mut self, file: usize) -> Result<()> { fn close(&mut self, _file: usize) -> Result<()> {
Ok(()) Ok(())
} }
} }

View file

@ -92,7 +92,7 @@ pub fn convert_slice_mut<T>(ptr: *mut T, len: usize) -> Result<&'static mut [T]>
Ok(unsafe { slice::from_raw_parts_mut(ptr, len) }) Ok(unsafe { slice::from_raw_parts_mut(ptr, len) })
} }
pub fn handle(a: usize, b: usize, c: usize, d: usize, e: usize, f: usize) -> ::core::result::Result<usize, usize> { pub fn handle(a: usize, b: usize, c: usize, d: usize, e: usize, _f: usize) -> ::core::result::Result<usize, usize> {
match Call::from(a) { match Call::from(a) {
Call::Exit => exit(b), Call::Exit => exit(b),
Call::Read => read(b, convert_slice_mut(c as *mut u8, d)?), Call::Read => read(b, convert_slice_mut(c as *mut u8, d)?),