clean up some easy warnings

This commit is contained in:
bunnie 2022-01-07 22:19:39 +08:00
parent b4bfaefa64
commit 3f4fea1274
4 changed files with 7 additions and 4 deletions

View file

@ -357,8 +357,8 @@ pub fn validate_xous_img(xous_img_offset: *const u32) -> bool {
println!("protected_version: {}", protected_version);
// a little insight to help debug what went wrong.
for words in image[signed_len as usize - 16 .. ].chunks(4) {
let word = u32::from_le_bytes(words.try_into().unwrap());
println!("{:x}", word);
let _word = u32::from_le_bytes(words.try_into().unwrap());
println!("{:x}", _word);
}
die();
}
@ -369,8 +369,8 @@ pub fn validate_xous_img(xous_img_offset: *const u32) -> bool {
println!("protected_len: {}", protected_len);
// a little insight to help debug what went wrong.
for words in image[signed_len as usize - 16 .. ].chunks(4) {
let word = u32::from_le_bytes(words.try_into().unwrap());
println!("{:x}", word);
let _word = u32::from_le_bytes(words.try_into().unwrap());
println!("{:x}", _word);
}
die();
}

View file

@ -1457,6 +1457,7 @@ impl BasisCacheEntry {
/// Runs through the dictionary listing in a basis and compacts them. Call when the
/// the dictionary space becomes sufficiently fragmented that accesses are becoming
/// inefficient.
#[allow(dead_code)]
pub(crate) fn dict_compact(&self, _basis_name: Option<&str>) -> Result<()> {
unimplemented!();
}

View file

@ -1057,6 +1057,7 @@ impl DerefMut for Dictionary {
}
}
#[allow(dead_code)]
#[derive(Debug)]
pub(crate) struct DictAttributes {
pub(crate) flags: DictFlags,

View file

@ -76,6 +76,7 @@ impl Pte {
}
VirtAddr::new(u64::from_le_bytes(full_addr)).unwrap()
}
#[allow(dead_code)]
pub fn flags(&self) -> PtFlags {
self.flags
}