RIOT-OS / rust-riot-wrappers

The `riot-wrappers` crate, which enables high-level access to RIOT from the Rust programming language
13 stars 10 forks source link

Fix several compiler warnings #62

Closed chrysn closed 1 year ago

chrysn commented 1 year ago

Most of this is refactoring around discouraged patterns, but the warnings found an actual error when what was meant to be leaking a refcounted pktsnip (because the C function is taking ownership of it) only leaked the (Copy, hence the complaint from the linter) pointer, leading to use-after-free / double-free. (A tests was added to catch this).

Set as a draft PR while I'm hunting the remaining warnings.