Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build warning due to unused return value #80

Merged
merged 2 commits into from
Jan 6, 2025

Conversation

schteve
Copy link
Collaborator

@schteve schteve commented Oct 16, 2024

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 schteve merged commit e26cd70 into lobaro:master Jan 6, 2025
3 checks passed
@schteve schteve deleted the timer-box branch January 6, 2025 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant