Remove some warnings.

pull/3/head
Yifan Wu 4 years ago
parent 606abbe6a1
commit 7c0d66c58f

@ -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;

@ -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")]

@ -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<VirtIOBlk<'static>>);
@ -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) }

@ -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

Loading…
Cancel
Save