Skip to content

Commit 41cf479

Browse files
committed
zephyr: Fix warnings when no alloc
Fix a few warnings that have crept into the code when building without allocation. Signed-off-by: David Brown <[email protected]>
1 parent e7d40e3 commit 41cf479

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

zephyr/src/sys/queue.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
77
use core::ffi::c_void;
88
use core::fmt;
9+
#[cfg(CONFIG_RUST_ALLOC)]
910
use core::mem;
1011

1112
use zephyr_sys::{
@@ -15,6 +16,7 @@ use zephyr_sys::{
1516
k_queue_get,
1617
};
1718

19+
#[cfg(CONFIG_RUST_ALLOC)]
1820
use crate::error::Result;
1921
use crate::sys::K_FOREVER;
2022
use crate::object::{Fixed, StaticKernelObject, Wrapped};

zephyr/src/sys/sync/mutex.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
//! [`object`]: crate::object
1010
1111
use core::fmt;
12+
#[cfg(CONFIG_RUST_ALLOC)]
1213
use core::mem;
1314
use crate::{
1415
error::{Result, to_result_void},

zephyr/src/sys/sync/semaphore.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
1414
use core::ffi::c_uint;
1515
use core::fmt;
16+
#[cfg(CONFIG_RUST_ALLOC)]
1617
use core::mem;
1718

1819
use crate::{

0 commit comments

Comments
 (0)