mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-29 04:13:24 +00:00
Fix several warnings when ktest is enabled
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
0f9285d72b
commit
49692c2068
@ -127,8 +127,6 @@ pub fn call_ostd_main() -> ! {
|
||||
}
|
||||
#[cfg(ktest)]
|
||||
unsafe {
|
||||
use alloc::boxed::Box;
|
||||
|
||||
use crate::task::TaskOptions;
|
||||
|
||||
crate::init();
|
||||
|
@ -245,7 +245,7 @@ mod test {
|
||||
.alloc_contiguous()
|
||||
.unwrap();
|
||||
let vm_segment_child = vm_segment_parent.range(0..1);
|
||||
let dma_coherent_parent = DmaCoherent::map(vm_segment_parent, false);
|
||||
let _dma_coherent_parent = DmaCoherent::map(vm_segment_parent, false);
|
||||
let dma_coherent_child = DmaCoherent::map(vm_segment_child, false);
|
||||
assert!(dma_coherent_child.is_err());
|
||||
}
|
||||
|
@ -334,7 +334,7 @@ mod test {
|
||||
.alloc_contiguous()
|
||||
.unwrap();
|
||||
let vm_segment_child = vm_segment_parent.range(0..1);
|
||||
let dma_stream_parent =
|
||||
let _dma_stream_parent =
|
||||
DmaStream::map(vm_segment_parent, DmaDirection::Bidirectional, false);
|
||||
let dma_stream_child = DmaStream::map(vm_segment_child, DmaDirection::Bidirectional, false);
|
||||
assert!(dma_stream_child.is_err());
|
||||
|
@ -120,7 +120,7 @@ fn test_alloc_dealloc() {
|
||||
let mut contiguous_options = FrameAllocOptions::new(10);
|
||||
contiguous_options.is_contiguous(true);
|
||||
let mut remember_vec = Vec::new();
|
||||
for i in 0..10 {
|
||||
for _ in 0..10 {
|
||||
for i in 0..10 {
|
||||
let single_frame = single_options.alloc_single().unwrap();
|
||||
if i % 3 == 0 {
|
||||
|
Reference in New Issue
Block a user