Skip to content

Commit

Permalink
codecheck: Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
wyfcyx committed Jan 21, 2024
1 parent 17a0ee7 commit 2ce5e52
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions os/src/fs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ pub trait File: Send + Sync {
fn write(&self, buf: UserBuffer) -> usize;
}

pub use inode::{list_apps, open_file, OSInode, OpenFlags};
pub use pipe::{make_pipe, Pipe};
pub use inode::{list_apps, open_file, OpenFlags};
pub use pipe::make_pipe;
pub use stdio::{Stdin, Stdout};
2 changes: 1 addition & 1 deletion os/src/mm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub use memory_set::{kernel_token, MapPermission, MemorySet, KERNEL_SPACE};
use page_table::PTEFlags;
pub use page_table::{
translated_byte_buffer, translated_ref, translated_refmut, translated_str, PageTable,
PageTableEntry, UserBuffer, UserBufferIterator,
PageTableEntry, UserBuffer,
};

pub fn init() {
Expand Down
2 changes: 1 addition & 1 deletion user/src/bin/adder_atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ extern crate user_lib;
extern crate alloc;

use alloc::vec::Vec;
use core::sync::atomic::{AtomicBool, Ordering};
use core::ptr::addr_of_mut;
use core::sync::atomic::{AtomicBool, Ordering};
use user_lib::{exit, get_time, thread_create, waittid, yield_};

static mut A: usize = 0;
Expand Down
5 changes: 4 additions & 1 deletion user/src/bin/eisenberg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ extern crate alloc;
extern crate core;

use alloc::vec::Vec;
use core::{ptr::{addr_of, addr_of_mut, read_volatile, write_volatile}, sync::atomic::{AtomicUsize, Ordering}};
use core::{
ptr::{addr_of, addr_of_mut, read_volatile, write_volatile},
sync::atomic::{AtomicUsize, Ordering},
};
use user_lib::{exit, sleep, thread_create, waittid};

const N: usize = 2;
Expand Down

0 comments on commit 2ce5e52

Please sign in to comment.