Warnings removal

This commit is contained in:
Jeremy Soller 2016-09-01 11:14:47 -06:00
parent 543ef3d96f
commit 53c71d9183
5 changed files with 10 additions and 12 deletions

View file

@ -40,6 +40,7 @@ bitflags! {
}
#[repr(u8)]
#[allow(dead_code)]
enum Command {
ReadConfig = 0x20,
WriteConfig = 0x60,
@ -55,6 +56,7 @@ enum Command {
}
#[repr(u8)]
#[allow(dead_code)]
enum KeyboardCommand {
EnableReporting = 0xF4,
SetDefaults = 0xF6,
@ -62,6 +64,7 @@ enum KeyboardCommand {
}
#[repr(u8)]
#[allow(dead_code)]
enum MouseCommand {
GetDeviceId = 0xF2,
EnableReporting = 0xF4,
@ -282,7 +285,7 @@ impl Ps2 {
dy -= 0x100;
}
let extra = if self.mouse_extra {
let _extra = if self.mouse_extra {
self.mouse[3]
} else {
0

View file

@ -32,6 +32,7 @@ bitflags! {
}
}
#[allow(dead_code)]
pub struct SerialPort {
/// Data register, read to receive, write to send
data: Pio<u8>,
@ -62,10 +63,6 @@ impl SerialPort {
}
}
fn int_en(&self) -> IntEnFlags {
IntEnFlags::from_bits_truncate(self.int_en.read())
}
fn line_sts(&self) -> LineStsFlags {
LineStsFlags::from_bits_truncate(self.line_sts.read())
}
@ -76,6 +73,7 @@ impl SerialPort {
}
fn init(&mut self) {
//TODO: Cleanup
self.int_en.write(0x00);
self.line_ctrl.write(0x80);
self.data.write(0x03);
@ -88,7 +86,7 @@ impl SerialPort {
pub fn on_receive(&mut self) {
let data = self.data.read();
write!(self, "SERIAL {:X}\n", data);
let _ = write!(self, "SERIAL {:X}\n", data);
}
}
@ -111,8 +109,6 @@ pub struct SerialConsole;
impl Write for SerialConsole {
fn write_str(&mut self, s: &str) -> Result<(), fmt::Error> {
COM1.lock().write_str(s);
Ok(())
COM1.lock().write_str(s)
}
}