fix warning on ARMv6-M

This commit is contained in:
Jorge Aparicio 2017-07-27 14:59:31 -05:00
parent dd539d114f
commit 5e83dc295e

View file

@ -101,7 +101,6 @@ pub unsafe fn claim<T, R, F>(
where where
F: FnOnce(T, &mut Threshold) -> R, F: FnOnce(T, &mut Threshold) -> R,
{ {
let max_priority = 1 << nvic_prio_bits;
if ceiling > t.value() { if ceiling > t.value() {
match () { match () {
#[cfg(armv6m)] #[cfg(armv6m)]
@ -109,6 +108,8 @@ where
#[cfg(not(armv6m))] #[cfg(not(armv6m))]
() => { () => {
let max_priority = 1 << nvic_prio_bits;
if ceiling == max_priority { if ceiling == max_priority {
atomic(t, |t| f(data, t)) atomic(t, |t| f(data, t))
} else { } else {