mirror of
https://github.com/esp-rs/esp-hal.git
synced 2025-09-28 21:00:59 +00:00
Clean up warnings (#2317)
This commit is contained in:
parent
be9dc0e0b7
commit
f93efa73a9
@ -923,8 +923,9 @@ unsafe impl DmaTxBuffer for EmptyBuf {
|
|||||||
type View = EmptyBuf;
|
type View = EmptyBuf;
|
||||||
|
|
||||||
fn prepare(&mut self) -> Preparation {
|
fn prepare(&mut self) -> Preparation {
|
||||||
|
#[allow(unused_unsafe)] // stable requires unsafe, nightly complains about it
|
||||||
Preparation {
|
Preparation {
|
||||||
start: unsafe { EMPTY.as_mut_ptr() },
|
start: unsafe { core::ptr::addr_of_mut!(EMPTY).cast() },
|
||||||
block_size: None,
|
block_size: None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -946,8 +947,9 @@ unsafe impl DmaRxBuffer for EmptyBuf {
|
|||||||
type View = EmptyBuf;
|
type View = EmptyBuf;
|
||||||
|
|
||||||
fn prepare(&mut self) -> Preparation {
|
fn prepare(&mut self) -> Preparation {
|
||||||
|
#[allow(unused_unsafe)] // stable requires unsafe, nightly complains about it
|
||||||
Preparation {
|
Preparation {
|
||||||
start: unsafe { EMPTY.as_mut_ptr() },
|
start: unsafe { core::ptr::addr_of_mut!(EMPTY).cast() },
|
||||||
block_size: None,
|
block_size: None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -257,8 +257,9 @@ fn stop_current_operation() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn set_next_rx_buffer() {
|
fn set_next_rx_buffer() {
|
||||||
|
#[allow(unused_unsafe)] // stable compiler needs unsafe, nightly complains about it
|
||||||
unsafe {
|
unsafe {
|
||||||
set_rx_addr(RX_BUFFER.as_mut_ptr());
|
set_rx_addr(core::ptr::addr_of_mut!(RX_BUFFER).cast());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user