diff --git a/src/hal/cortex_m3/isr.rs b/src/hal/cortex_m3/isr.rs index f399f782..f4282aa1 100644 --- a/src/hal/cortex_m3/isr.rs +++ b/src/hal/cortex_m3/isr.rs @@ -46,7 +46,7 @@ static ISRCount: uint = 16; #[link_section=".isr_vector"] #[no_mangle] -pub static ISRVectors: [Option, ..ISRCount] = [ +pub static ISRVectors: [Option, ..ISRCount] = [ Some(__STACK_BASE), Some(main), // Reset Some(isr_nmi), // NMI diff --git a/src/hal/lpc17xx/isr.rs b/src/hal/lpc17xx/isr.rs index 6055d6d8..bdd4a93c 100644 --- a/src/hal/lpc17xx/isr.rs +++ b/src/hal/lpc17xx/isr.rs @@ -57,7 +57,7 @@ static ISRCount: uint = 35; #[link_section=".isr_vector_nvic"] #[no_mangle] -pub static NVICVectors: [Option, ..ISRCount] = [ +pub static NVICVectors: [Option, ..ISRCount] = [ // s.a. lpc17xx user manual, table 50 (chapter 6.3) Some(isr_wdt), Some(isr_timer_0), diff --git a/src/lib/volatile_cell.rs b/src/lib/volatile_cell.rs index d53d5767..be1aa50f 100644 --- a/src/lib/volatile_cell.rs +++ b/src/lib/volatile_cell.rs @@ -17,8 +17,9 @@ use core::kinds::marker; use core::intrinsics::{volatile_load, volatile_store}; -use core::cast::transmute_mut_unsafe; +// TODO(bharrisau) I don't know enough about markers - is it better +// to just use an Unsafe here instead? pub struct VolatileCell { value: T, invariant: marker::InvariantType, @@ -42,7 +43,7 @@ impl VolatileCell { #[inline] pub fn set(&self, value: T) { unsafe { - volatile_store(&mut (*transmute_mut_unsafe(&self.value)), value) + volatile_store(&self.value as *T as *mut T, value) } } } diff --git a/src/os/debug.rs b/src/os/debug.rs index 62f7eee0..cd10562f 100644 --- a/src/os/debug.rs +++ b/src/os/debug.rs @@ -15,8 +15,7 @@ //! debug::port provides interface to output structured data over serial port. -use core::mem::size_of; -use core::cast::transmute; +use core::mem::{size_of, transmute}; use core::intrinsics::abort; use drivers::chario::CharIO;