From 433a9cdaf1b225ae9e3367b160e3bfc0c58543fe Mon Sep 17 00:00:00 2001 From: mwojcik Date: Tue, 29 Mar 2022 10:04:39 +0800 Subject: [PATCH] runtime: fix warnings on nondrtio systems --- src/runtime/src/comms.rs | 5 +++-- src/runtime/src/kernel/mod.rs | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/runtime/src/comms.rs b/src/runtime/src/comms.rs index d33e618..13a4a24 100644 --- a/src/runtime/src/comms.rs +++ b/src/runtime/src/comms.rs @@ -159,7 +159,7 @@ async fn write_exception_string(stream: &TcpStream, s: CSlice<'static, u8>) -> R Ok(()) } -async fn handle_run_kernel(stream: Option<&TcpStream>, control: &Rc>, up_destinations: &Rc>) -> Result<()> { +async fn handle_run_kernel(stream: Option<&TcpStream>, control: &Rc>, _up_destinations: &Rc>) -> Result<()> { control.borrow_mut().tx.async_send(kernel::Message::StartRequest).await; loop { let reply = control.borrow_mut().rx.async_recv().await; @@ -290,8 +290,9 @@ async fn handle_run_kernel(stream: Option<&TcpStream>, control: &Rc { - let result = up_destinations.borrow()[destination as usize]; + let result = _up_destinations.borrow()[destination as usize]; control.borrow_mut().tx.async_send(kernel::Message::UpDestinationsReply(result)).await; } _ => { diff --git a/src/runtime/src/kernel/mod.rs b/src/runtime/src/kernel/mod.rs index f1770a3..3e6a900 100644 --- a/src/runtime/src/kernel/mod.rs +++ b/src/runtime/src/kernel/mod.rs @@ -48,7 +48,9 @@ pub enum Message { DmaGetRequest(String), DmaGetReply(Option<(Vec, i64)>), + #[cfg(has_drtio)] UpDestinationsRequest(i32), + #[cfg(has_drtio)] UpDestinationsReply(bool), }