diff --git a/os/src/config.rs b/os/src/config.rs index 9a015bdc..0633c4da 100644 --- a/os/src/config.rs +++ b/os/src/config.rs @@ -1,3 +1,5 @@ +#[allow(unused)] + pub const USER_STACK_SIZE: usize = 4096 * 2; pub const KERNEL_STACK_SIZE: usize = 4096 * 2; pub const KERNEL_HEAP_SIZE: usize = 0x20_0000; diff --git a/os/src/drivers/block/mod.rs b/os/src/drivers/block/mod.rs index abf20b61..f79b8b81 100644 --- a/os/src/drivers/block/mod.rs +++ b/os/src/drivers/block/mod.rs @@ -3,7 +3,6 @@ mod sdcard; use lazy_static::*; use alloc::sync::Arc; -use core::any::Any; use easy_fs::BlockDevice; #[cfg(feature = "board_qemu")] diff --git a/os/src/drivers/block/virtio_blk.rs b/os/src/drivers/block/virtio_blk.rs index 2c045ed6..fde3428c 100644 --- a/os/src/drivers/block/virtio_blk.rs +++ b/os/src/drivers/block/virtio_blk.rs @@ -1,3 +1,4 @@ + use virtio_drivers::{VirtIOBlk, VirtIOHeader}; use crate::mm::{ PhysAddr, @@ -15,6 +16,7 @@ use spin::Mutex; use alloc::vec::Vec; use lazy_static::*; +#[allow(unused)] const VIRTIO0: usize = 0x10001000; pub struct VirtIOBlock(Mutex>); @@ -33,6 +35,7 @@ impl BlockDevice for VirtIOBlock { } impl VirtIOBlock { + #[allow(unused)] pub fn new() -> Self { Self(Mutex::new(VirtIOBlk::new( unsafe { &mut *(VIRTIO0 as *mut VirtIOHeader) } diff --git a/os/src/syscall/process.rs b/os/src/syscall/process.rs index ca4482b2..370ae9cb 100644 --- a/os/src/syscall/process.rs +++ b/os/src/syscall/process.rs @@ -11,7 +11,6 @@ use crate::mm::{ translated_refmut, }; use crate::fs::{ - OSInode, open_file, OpenFlags, }; @@ -87,7 +86,7 @@ pub fn sys_waitpid(pid: isize, exit_code_ptr: *mut i32) -> isize { }); if let Some((idx, _)) = pair { let child = inner.children.remove(idx); - // confirm that child will be deallocated after removing from children list + // confirm that child will be deallocated after being removed from children list assert_eq!(Arc::strong_count(&child), 1); let found_pid = child.getpid(); // ++++ temporarily hold child lock