From cb0d9c9c38945404272b89c3c6d8166c194a01f8 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Mon, 8 Aug 2022 12:23:32 -0400 Subject: mark logging functions as unsafe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit these are writing to ‘static mut’ variables. --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index a711398..48fffea 100755 --- a/src/main.rs +++ b/src/main.rs @@ -54,13 +54,13 @@ fn main(_hartid: usize) -> ! { &mut rcu, ); let (tx, _rx) = serial.split(); - log::new(tx); + unsafe { log::new(tx) }; loop { let mut can_sleep = true; can_sleep &= blink.poll() == PollResult::WouldBlock; - log::log("hi\r\n"); + unsafe { log::log("hi\r\n") }; if can_sleep { unsafe { wfi() }; -- cgit v1.2.3