From 3f4fea12741f98b06cf37e5e81ab5c860e2ef3c7 Mon Sep 17 00:00:00 2001 From: bunnie Date: Fri, 7 Jan 2022 22:19:39 +0800 Subject: [PATCH] clean up some easy warnings --- loader/src/secboot.rs | 8 ++++---- services/pddb/src/backend/basis.rs | 1 + services/pddb/src/backend/dictionary.rs | 1 + services/pddb/src/backend/pagetable.rs | 1 + 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/loader/src/secboot.rs b/loader/src/secboot.rs index e1c2b7de1..dccba22b0 100644 --- a/loader/src/secboot.rs +++ b/loader/src/secboot.rs @@ -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(); } diff --git a/services/pddb/src/backend/basis.rs b/services/pddb/src/backend/basis.rs index 31c547f5f..df9474080 100644 --- a/services/pddb/src/backend/basis.rs +++ b/services/pddb/src/backend/basis.rs @@ -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!(); } diff --git a/services/pddb/src/backend/dictionary.rs b/services/pddb/src/backend/dictionary.rs index 98c6c6437..890e1bc17 100644 --- a/services/pddb/src/backend/dictionary.rs +++ b/services/pddb/src/backend/dictionary.rs @@ -1057,6 +1057,7 @@ impl DerefMut for Dictionary { } } +#[allow(dead_code)] #[derive(Debug)] pub(crate) struct DictAttributes { pub(crate) flags: DictFlags, diff --git a/services/pddb/src/backend/pagetable.rs b/services/pddb/src/backend/pagetable.rs index cf5125c45..8897dfd83 100644 --- a/services/pddb/src/backend/pagetable.rs +++ b/services/pddb/src/backend/pagetable.rs @@ -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 }