mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
kernel: hosted: fix unused variable warnings
These only appear when not printing messages. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
5c89487ca2
commit
1291a2b3aa
1 changed files with 9 additions and 5 deletions
|
|
@ -68,6 +68,7 @@ fn generate_pid_key() -> [u8; 16] {
|
||||||
process_key
|
process_key
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
pub fn current_pid() -> PID {
|
pub fn current_pid() -> PID {
|
||||||
crate::arch::process::current_pid()
|
crate::arch::process::current_pid()
|
||||||
}
|
}
|
||||||
|
|
@ -85,13 +86,14 @@ fn handle_connection(
|
||||||
ServerPacketWithData([usize; 9], Vec<u8>),
|
ServerPacketWithData([usize; 9], Vec<u8>),
|
||||||
}
|
}
|
||||||
|
|
||||||
fn conn_thread(mut conn: TcpStream, sender: Sender<ServerMessage>, pid: PID) {
|
fn conn_thread(mut conn: TcpStream, sender: Sender<ServerMessage>, _pid: PID) {
|
||||||
loop {
|
loop {
|
||||||
let mut raw_data = [0u8; 9 * std::mem::size_of::<usize>()];
|
let mut raw_data = [0u8; 9 * std::mem::size_of::<usize>()];
|
||||||
if let Err(e) = conn.read_exact(&mut raw_data) {
|
if let Err(_e) = conn.read_exact(&mut raw_data) {
|
||||||
println!(
|
#[cfg(not(test))]
|
||||||
|
eprintln!(
|
||||||
"KERNEL({}): client disconnected: {} -- shutting down virtual process",
|
"KERNEL({}): client disconnected: {} -- shutting down virtual process",
|
||||||
pid, e
|
_pid, _e
|
||||||
);
|
);
|
||||||
sender.send(ServerMessage::Exit).ok();
|
sender.send(ServerMessage::Exit).ok();
|
||||||
return;
|
return;
|
||||||
|
|
@ -159,7 +161,8 @@ fn handle_connection(
|
||||||
for msg in receiver {
|
for msg in receiver {
|
||||||
match msg {
|
match msg {
|
||||||
ServerMessage::Exit => {
|
ServerMessage::Exit => {
|
||||||
println!("KERNEL({}): Received ServerMessage::Exit", pid);
|
#[cfg(not(test))]
|
||||||
|
eprintln!("KERNEL({}): Received ServerMessage::Exit", pid);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ServerMessage::ServerPacket(pkt) => {
|
ServerMessage::ServerPacket(pkt) => {
|
||||||
|
|
@ -259,6 +262,7 @@ fn handle_connection(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#[cfg(not(test))]
|
||||||
eprintln!(
|
eprintln!(
|
||||||
"KERNEL({}): Finished the thread so sending TerminateProcess",
|
"KERNEL({}): Finished the thread so sending TerminateProcess",
|
||||||
pid
|
pid
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue