clean up hosted mode warnings

This commit is contained in:
bunnie 2021-03-03 22:50:46 +08:00
parent 313f12acbb
commit e62256b3df
6 changed files with 13 additions and 10 deletions

View file

@ -6,6 +6,7 @@ use core::fmt::{Error, Write};
#[cfg(baremetal)]
use utralib::generated::*;
#[allow(dead_code)] // this is unused in hosted mode, kill the warning
static mut INITIALIZED: bool = false;
#[macro_use]

View file

@ -816,7 +816,7 @@ impl SystemServices {
"\n\r KERNEL({},{}): Activating process {} thread {}",
previous_pid, previous_tid, new_pid, new_tid
);
ArchProcess::with_current(|current| current.print_thread());
//ArchProcess::with_current(|current| current.print_thread());
}
// Save state if the PID has changed. This will activate the new memory

View file

@ -178,9 +178,8 @@ mod implementation {
use crate::WorkRequest;
use com_rs_ref as com_rs;
use com_rs::*;
use log::{error, info};
use log::error;
#[macro_use]
use heapless::Vec;
use heapless::consts::*;
@ -201,7 +200,7 @@ mod implementation {
0xDEAD as u16
}
pub fn wait_txrx(&mut self, tx: u16, timeout: Option<u32>) -> u16 {
pub fn wait_txrx(&mut self, _tx: u16, _timeout: Option<u32>) -> u16 {
0xDEAD as u16
}

View file

@ -19,6 +19,7 @@ use xous::buffer;
use rkyv::{archived_value, Write};
/// Compute the dvorak key mapping of row/col to key tuples
#[allow(dead_code)]
fn map_dvorak(code: RowCol) -> ScanCode {
let rc = (code.r, code.c);
@ -93,6 +94,7 @@ fn map_dvorak(code: RowCol) -> ScanCode {
/// Compute the dvorak key mapping of row/col to key tuples
#[allow(dead_code)]
fn map_qwerty(code: RowCol) -> ScanCode {
let rc = (code.r, code.c);
@ -743,9 +745,10 @@ mod implementation {
use heapless::Vec;
use heapless::consts::*;
use crate::api::*;
use crate::{map_dvorak, map_qwerty};
use log::{error, info};
//use crate::{map_dvorak, map_qwerty};
//use log::{error, info};
#[allow(dead_code)]
pub struct Keyboard {
map: KeyMap,
rate: u32,

View file

@ -110,8 +110,7 @@ mod implementation {
// a stub to try to avoid breaking hosted mode for as long as possible.
#[cfg(not(target_os = "none"))]
mod implementation {
use crate::api::*;
use log::{error, info};
use log::info;
pub struct Trng {
seed: u32,
@ -131,6 +130,7 @@ mod implementation {
lfsr
}
#[allow(dead_code)]
pub fn wait_full(&self) { }
pub fn get_trng(&mut self, _count: usize) -> [u32; 2] {

View file

@ -192,8 +192,8 @@ fn run(debug: bool) -> Result<(), DynError> {
let init = [
//"shell",
"gam",
"ime-frontend",
"ime-plugin-shell",
//"ime-frontend",
//"ime-plugin-shell",
//"benchmark",
//"benchmark-target",
"log-server",