From e18eb9610ea2acab0116a211b6e3ed0d99a2570d Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Sat, 8 Jul 2017 21:56:15 -0500 Subject: [PATCH] fix unused variable warning around interrupt::free --- macros/src/trans.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/macros/src/trans.rs b/macros/src/trans.rs index b1cf7e796c..021cadb8d3 100644 --- a/macros/src/trans.rs +++ b/macros/src/trans.rs @@ -75,7 +75,7 @@ fn init(app: &App, main: &mut Vec, root: &mut Vec) { Kind::Exception => { if exceptions.is_empty() { exceptions.push(quote! { - let scb = #device::SCB.borrow(cs); + let scb = #device::SCB.borrow(_cs); }); } @@ -89,7 +89,7 @@ fn init(app: &App, main: &mut Vec, root: &mut Vec) { Kind::Interrupt { enabled } => { if interrupts.is_empty() { interrupts.push(quote! { - let nvic = #device::NVIC.borrow(cs); + let nvic = #device::NVIC.borrow(_cs); }); } @@ -118,7 +118,7 @@ fn init(app: &App, main: &mut Vec, root: &mut Vec) { // type check let init: fn(init::Peripherals, init::Resources) = #init; - #krate::atomic(|cs| unsafe { + #krate::atomic(|_cs| unsafe { init(init::Peripherals::all(), init::Resources::new()); #(#exceptions)*