diff --git a/build.rs b/build.rs index 3619dded..640361ce 100644 --- a/build.rs +++ b/build.rs @@ -7,7 +7,7 @@ fn main() -> Result<(), Box> { // Build our helloworld.wast into binary. let binary = wat::parse_file("src/helloworld.wast")?; - fs::write(out_dir.join("helloworld.wasm"), &binary)?; + fs::write(out_dir.join("helloworld.wasm"), binary)?; println!("cargo:rerun-if-changed=src/helloworld.wast"); println!("cargo:rerun-if-changed=x86_64-mycelium.json"); diff --git a/hal-x86_64/src/interrupt.rs b/hal-x86_64/src/interrupt.rs index 3523e69b..b46f13eb 100644 --- a/hal-x86_64/src/interrupt.rs +++ b/hal-x86_64/src/interrupt.rs @@ -546,14 +546,8 @@ impl hal_core::interrupt::Control for Idt { self.set_isr(Self::PIC_PS2_KEYBOARD, keyboard_isr:: as *const ()); self.set_isr(Self::IOAPIC_PS2_KEYBOARD, keyboard_isr:: as *const ()); // local APIC specific hardware itnerrupts - self.set_isr( - Self::LOCAL_APIC_SPURIOUS as usize, - spurious_isr as *const (), - ); - self.set_isr( - Self::LOCAL_APIC_TIMER as usize, - apic_timer_isr:: as *const (), - ); + self.set_isr(Self::LOCAL_APIC_SPURIOUS, spurious_isr as *const ()); + self.set_isr(Self::LOCAL_APIC_TIMER, apic_timer_isr:: as *const ()); // vector 69 (nice) is reserved by the HAL for testing the IDT. self.set_isr(69, test_isr:: as *const ()); diff --git a/pci/src/express.rs b/pci/src/express.rs index 97cb9cd9..376013fb 100644 --- a/pci/src/express.rs +++ b/pci/src/express.rs @@ -1,3 +1,5 @@ +// this module is mostly not yet implemented... +#![allow(dead_code)] use crate::{ device::{self, CardBusDetails, PciBridgeDetails, StandardDetails}, register, @@ -21,6 +23,8 @@ impl<'device> MemoryMappedDevice<'device> { } pub fn send_command(&mut self, command: register::Command) { + // suppress unused warning + let _ = command; todo!() } } diff --git a/src/arch/x86_64.rs b/src/arch/x86_64.rs index add5a59d..ff5e424a 100644 --- a/src/arch/x86_64.rs +++ b/src/arch/x86_64.rs @@ -1,5 +1,3 @@ -use alloc::boxed::Box; -use core::cell::RefCell; use hal_core::boot::BootInfo; use hal_x86_64::{ cpu::{self, local::GsLocalData}, diff --git a/trace/src/buf.rs b/trace/src/buf.rs index 09430a3f..cda2512f 100644 --- a/trace/src/buf.rs +++ b/trace/src/buf.rs @@ -365,19 +365,19 @@ mod tests { } fn test_range_iters(buf: &LineBuf, expected: &[&str]) { - assert_slicelike("unbounded", &buf, &expected, ..); + assert_slicelike("unbounded", buf, expected, ..); - assert_slicelike("start inclusive", &buf, &expected, 2..); - assert_slicelike("start inclusive", &buf, &expected, 3..); - assert_slicelike("start inclusive", &buf, &expected, 4..); - assert_slicelike("start inclusive", &buf, &expected, 5..); + assert_slicelike("start inclusive", buf, expected, 2..); + assert_slicelike("start inclusive", buf, expected, 3..); + assert_slicelike("start inclusive", buf, expected, 4..); + assert_slicelike("start inclusive", buf, expected, 5..); - assert_slicelike("end inclusive", &buf, &expected, ..=2); - assert_slicelike("end inclusive", &buf, &expected, ..=5); + assert_slicelike("end inclusive", buf, expected, ..=2); + assert_slicelike("end inclusive", buf, expected, ..=5); - assert_slicelike("end exclusive", &buf, &expected, ..2); - assert_slicelike("end exclusive", &buf, &expected, ..5); - assert_slicelike("end exclusive", &buf, &expected, ..6) + assert_slicelike("end exclusive", buf, expected, ..2); + assert_slicelike("end exclusive", buf, expected, ..5); + assert_slicelike("end exclusive", buf, expected, ..6) } fn fill(mut buf: &mut LineBuf, strs: &[&str]) {