Skip to content

Commit

Permalink
fix: Fix nightly errors
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioGasquez committed Aug 13, 2024
1 parent 888e942 commit ae522b5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion esp-backtrace/src/riscv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
7 changes: 4 additions & 3 deletions esp-lp-hal/src/uart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,19 @@ pub mod config {
/// Even parity
ParityEven = 1,
/// Odd parity
ParityOdd = 2,
ParityOdd = 2,
}

/// Number of stop bits
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
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
Expand Down Expand Up @@ -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),
}
}
Expand Down
1 change: 1 addition & 0 deletions esp-wifi/src/common_adapter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions examples/src/bin/debug_assist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions xtensa-lx/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit ae522b5

Please sign in to comment.