diff --git a/esp-backtrace/src/riscv.rs b/esp-backtrace/src/riscv.rs index 06d666174ee..e75dde52af3 100644 --- a/esp-backtrace/src/riscv.rs +++ b/esp-backtrace/src/riscv.rs @@ -12,7 +12,7 @@ pub(super) const RA_OFFSET: usize = 4; /// Registers saved in trap handler #[doc(hidden)] -#[allow(missing_docs)] +#[allow(missing_docs, dead_code)] #[derive(Default, Clone, Copy)] #[cfg_attr(feature = "defmt", derive(defmt::Format))] #[repr(C)] diff --git a/esp-lp-hal/src/uart.rs b/esp-lp-hal/src/uart.rs index 9e05c1f120b..ad8d0621207 100644 --- a/esp-lp-hal/src/uart.rs +++ b/esp-lp-hal/src/uart.rs @@ -88,7 +88,7 @@ pub mod config { /// Even parity ParityEven = 1, /// Odd parity - ParityOdd = 2, + ParityOdd = 2, } /// Number of stop bits @@ -96,11 +96,11 @@ pub mod config { pub enum StopBits { /// 1 stop bit #[default] - Stop1 = 1, + Stop1 = 1, /// 1.5 stop bits Stop1p5 = 2, /// 2 stop bits - Stop2 = 3, + Stop2 = 3, } /// UART configuration @@ -320,6 +320,7 @@ impl embedded_io::Write for LpUart { match self.flush_tx() { Ok(_) => break, Err(nb::Error::WouldBlock) => { /* Wait */ } + #[allow(unreachable_patterns)] Err(nb::Error::Other(e)) => return Err(e), } } diff --git a/esp-wifi/src/common_adapter/mod.rs b/esp-wifi/src/common_adapter/mod.rs index 50e7ce548af..4063c94304d 100644 --- a/esp-wifi/src/common_adapter/mod.rs +++ b/esp-wifi/src/common_adapter/mod.rs @@ -311,6 +311,7 @@ mod log { // #define ESP_EVENT_DEFINE_BASE(id) esp_event_base_t id = #id static mut EVT: i8 = 0; #[no_mangle] +#[allow(unused_unsafe)] static mut WIFI_EVENT: esp_event_base_t = unsafe { addr_of!(EVT) }; // stuff needed by wpa-supplicant diff --git a/examples/src/bin/debug_assist.rs b/examples/src/bin/debug_assist.rs index 8b7e09772ca..a5168dd6201 100644 --- a/examples/src/bin/debug_assist.rs +++ b/examples/src/bin/debug_assist.rs @@ -12,10 +12,7 @@ use core::cell::RefCell; use critical_section::Mutex; use esp_backtrace as _; use esp_hal::{ - assist_debug::DebugAssist, - clock::ClockControl, - peripherals::Peripherals, - prelude::*, + assist_debug::DebugAssist, clock::ClockControl, peripherals::Peripherals, prelude::*, system::SystemControl, }; use esp_println::println; @@ -42,7 +39,9 @@ fn main() -> ! { static mut _stack_end: u32; } + #[allow(unused_unsafe)] let stack_top = unsafe { addr_of_mut!(_stack_start) } as *mut _ as u32; + #[allow(unused_unsafe)] let stack_bottom = unsafe { addr_of_mut!(_stack_end) } as *mut _ as u32; let size = 4096; diff --git a/xtensa-lx/src/lib.rs b/xtensa-lx/src/lib.rs index 353870e6db1..d334dae215c 100644 --- a/xtensa-lx/src/lib.rs +++ b/xtensa-lx/src/lib.rs @@ -80,9 +80,9 @@ pub fn get_program_counter() -> *const u32 { unsafe { asm!(" mov {1}, {2} - call0 1f + call0 2f .align 4 - 1: + 2: mov {0}, {2} mov {2}, {1} ", out(reg) x, out(reg) _, out(reg) _, options(nostack))