From 9a241b9f84669a24690d34ec0dd09d62b474a41d Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Tue, 26 Mar 2024 11:01:28 +0100 Subject: [PATCH] riot-rs-rt: silence "dead_code" lints when building dummy --- src/riot-rs-rt/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/riot-rs-rt/src/lib.rs b/src/riot-rs-rt/src/lib.rs index ffae409e0..bc77a03e1 100644 --- a/src/riot-rs-rt/src/lib.rs +++ b/src/riot-rs-rt/src/lib.rs @@ -35,6 +35,7 @@ cfg_if::cfg_if! { } else { // Provide a default architecture, for arch-independent tooling mod arch { + #[cfg_attr(not(context = "riot-rs"), allow(dead_code))] pub fn init() {} pub fn benchmark(_iterations: usize, _f: F) -> core::result::Result { unimplemented!(); @@ -70,6 +71,7 @@ use linkme::distributed_slice; pub static INIT_FUNCS: [fn()] = [..]; #[inline] +#[cfg_attr(not(context = "riot-rs"), allow(dead_code))] fn startup() -> ! { arch::init();