From 7a87ce7cfada4f31237502733763be6e723e515b Mon Sep 17 00:00:00 2001 From: yufeng <321353225@qq.com> Date: Fri, 3 Mar 2023 17:14:24 +0800 Subject: [PATCH] fix warnnings --- os/src/net/port_table.rs | 6 ++++-- os/src/syscall/net.rs | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/os/src/net/port_table.rs b/os/src/net/port_table.rs index c7690758..fa178cf1 100644 --- a/os/src/net/port_table.rs +++ b/os/src/net/port_table.rs @@ -2,7 +2,9 @@ use alloc::{vec::Vec, sync::Arc}; use lazy_static::lazy_static; use lose_net_stack::packets::tcp::TCPPacket; -use crate::{sync::UPIntrFreeCell, fs::File, task::{TaskControlBlock, wakeup_task}}; +use crate::fs::File; +use crate::sync::UPIntrFreeCell; +use crate::task::TaskControlBlock; use super::tcp::TCP; @@ -83,7 +85,7 @@ pub fn check_accept(port: u16, tcp_packet: &TCPPacket) -> Option<()> { }) } -pub fn accept_connection(port: u16, tcp_packet: &TCPPacket, task: Arc) { +pub fn accept_connection(_port: u16, tcp_packet: &TCPPacket, task: Arc) { let process = task.process.upgrade().unwrap(); let mut inner = process.inner_exclusive_access(); let fd = inner.alloc_fd(); diff --git a/os/src/syscall/net.rs b/os/src/syscall/net.rs index 57f8e07a..f34b047a 100644 --- a/os/src/syscall/net.rs +++ b/os/src/syscall/net.rs @@ -1,7 +1,7 @@ use crate::net::port_table::{listen, PortFd, accept, port_acceptable}; use crate::net::udp::UDP; use crate::net::{IPv4, net_interrupt_handler}; -use crate::task::{current_process, block_current_and_run_next, current_task, current_trap_cx}; +use crate::task::{current_process, current_task, current_trap_cx}; use alloc::sync::Arc; // just support udp