Remove some warnings.

This commit is contained in:
Yifan Wu 2020-12-20 23:49:35 +08:00
parent b121689d08
commit 08bc677d3b
4 changed files with 6 additions and 3 deletions

View file

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

View file

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