diff --git a/esp-backtrace/src/riscv.rs b/esp-backtrace/src/riscv.rs index 50aae2bf17e..9c20924849f 100644 --- a/esp-backtrace/src/riscv.rs +++ b/esp-backtrace/src/riscv.rs @@ -15,6 +15,7 @@ pub(super) const RA_OFFSET: usize = 4; #[derive(Default, Clone, Copy)] #[cfg_attr(feature = "defmt", derive(defmt::Format))] #[repr(C)] +#[cfg(feature = "exception-handler")] pub(crate) struct TrapFrame { /// Return address, stores the address to return to after a function call or /// interrupt. @@ -102,6 +103,7 @@ pub(crate) struct TrapFrame { pub mtval: usize, } +#[cfg(feature = "exception-handler")] impl core::fmt::Debug for TrapFrame { fn fmt(&self, fmt: &mut core::fmt::Formatter<'_>) -> Result<(), core::fmt::Error> { write!( diff --git a/esp-hal/src/soc/esp32c6/efuse/fields.rs b/esp-hal/src/soc/esp32c6/efuse/fields.rs index c9867e0d251..793d9ab7f9c 100644 --- a/esp-hal/src/soc/esp32c6/efuse/fields.rs +++ b/esp-hal/src/soc/esp32c6/efuse/fields.rs @@ -235,6 +235,8 @@ pub const SPI_DOWNLOAD_MSPI_DIS: EfuseField = EfuseField::new(EfuseBlock::Block0 /// `[DIS_CAN]` Represents whether TWAI function is disabled or enabled. 1: /// disabled. 0: enabled pub const DIS_TWAI: EfuseField = EfuseField::new(EfuseBlock::Block0, 46, 1); +#[allow(unknown_lints)] +#[allow(clippy::too_long_first_doc_paragraph)] /// `[]` Represents whether the selection between usb_to_jtag and pad_to_jtag /// through strapping gpio15 when both EFUSE_DIS_PAD_JTAG and EFUSE_DIS_USB_JTAG /// are equal to 0 is enabled or disabled. 1: enabled. 0: disabled diff --git a/esp-lp-hal/src/uart.rs b/esp-lp-hal/src/uart.rs index 9e05c1f120b..8ffd2ba0f06 100644 --- a/esp-lp-hal/src/uart.rs +++ b/esp-lp-hal/src/uart.rs @@ -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/esp-wifi/src/esp_now/mod.rs b/esp-wifi/src/esp_now/mod.rs index f90ae622e04..44fa7d96b91 100644 --- a/esp-wifi/src/esp_now/mod.rs +++ b/esp-wifi/src/esp_now/mod.rs @@ -438,6 +438,8 @@ impl<'d> EspNowSender<'d> { } } +#[allow(unknown_lints)] +#[allow(clippy::too_long_first_doc_paragraph)] /// This struct is returned by a sync esp now send. Invoking `wait` method of /// this struct will block current task until the callback function of esp now /// send is called and return the status of previous sending. @@ -535,6 +537,8 @@ impl<'d> Drop for EspNowRc<'d> { } } +#[allow(unknown_lints)] +#[allow(clippy::too_long_first_doc_paragraph)] /// ESP-NOW is a kind of connectionless Wi-Fi communication protocol that is /// defined by Espressif. In ESP-NOW, application data is encapsulated in a /// vendor-specific action frame and then transmitted from one Wi-Fi device to diff --git a/examples/src/bin/debug_assist.rs b/examples/src/bin/debug_assist.rs index 8b7e09772ca..37a236c2287 100644 --- a/examples/src/bin/debug_assist.rs +++ b/examples/src/bin/debug_assist.rs @@ -42,7 +42,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/examples/src/bin/embassy_usb_serial_jtag.rs b/examples/src/bin/embassy_usb_serial_jtag.rs index 4282ed4c971..9cb154f83b7 100644 --- a/examples/src/bin/embassy_usb_serial_jtag.rs +++ b/examples/src/bin/embassy_usb_serial_jtag.rs @@ -57,6 +57,7 @@ async fn reader( string_buffer.extend_from_slice(&rbuf[..len]).unwrap(); signal.signal(heapless::String::from_utf8(string_buffer).unwrap()); } + #[allow(unreachable_patterns)] Err(e) => esp_println::println!("RX Error: {:?}", e), } } 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))