fix warnnings

This commit is contained in:
yufeng 2023-03-03 17:14:24 +08:00 committed by Yifan Wu
parent 2a4c7c2cc3
commit 7a87ce7cfa
2 changed files with 5 additions and 3 deletions

View File

@ -2,7 +2,9 @@ use alloc::{vec::Vec, sync::Arc};
use lazy_static::lazy_static; use lazy_static::lazy_static;
use lose_net_stack::packets::tcp::TCPPacket; 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; 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<TaskControlBlock>) { pub fn accept_connection(_port: u16, tcp_packet: &TCPPacket, task: Arc<TaskControlBlock>) {
let process = task.process.upgrade().unwrap(); let process = task.process.upgrade().unwrap();
let mut inner = process.inner_exclusive_access(); let mut inner = process.inner_exclusive_access();
let fd = inner.alloc_fd(); let fd = inner.alloc_fd();

View File

@ -1,7 +1,7 @@
use crate::net::port_table::{listen, PortFd, accept, port_acceptable}; use crate::net::port_table::{listen, PortFd, accept, port_acceptable};
use crate::net::udp::UDP; use crate::net::udp::UDP;
use crate::net::{IPv4, net_interrupt_handler}; 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; use alloc::sync::Arc;
// just support udp // just support udp