FreeRTOS-rust icon indicating copy to clipboard operation
FreeRTOS-rust copied to clipboard

Fix build warning due to unused return value

Open schteve opened this issue 1 year ago • 0 comments

error: unused return value of `alloc::boxed::Box::<T, A>::into_raw` that must be used
   --> freertos-rust/src/timers.rs:124:25
    |
124 |                         Box::into_raw(b);
    |                         ^^^^^^^^^^^^^^^^
    |
    = note: losing the pointer will leak memory
    = note: `-D unused-must-use` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(unused_must_use)]`
help: use `let _ = ...` to ignore the resulting value
    |
124 |                         let _ = Box::into_raw(b);
    |                         +++++++

schteve avatar Oct 16 '24 01:10 schteve