mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
clean up more warnings and errors
This commit is contained in:
parent
421a3814d8
commit
350276c08a
4 changed files with 8 additions and 4 deletions
|
|
@ -59,4 +59,4 @@ mbbb = []
|
|||
deterministic = []
|
||||
# this flag adds CI tests to the build
|
||||
ci = []
|
||||
default = ["mbbb", "deterministic", "ci"]
|
||||
default = ["mbbb"]
|
||||
|
|
|
|||
|
|
@ -887,6 +887,7 @@ impl BasisCache {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub(crate) fn basis_list(&self) -> Vec<String> {
|
||||
let mut ret = Vec::new();
|
||||
for bcache in &self.cache {
|
||||
|
|
@ -913,6 +914,7 @@ impl BasisCache {
|
|||
/// note: you can "delete" a basis simply by forgetting its password, but this is more thorough.
|
||||
/// there might also need to be a variant to make which is a "change my password" function, but that is actually
|
||||
/// surprisingly hard.
|
||||
#[allow(dead_code)]
|
||||
pub(crate) fn basis_delete(&mut self, hw: &mut PddbOs, mut basis: BasisCacheEntry) {
|
||||
let mut temp: [u8; PAGE_SIZE] = [0; PAGE_SIZE];
|
||||
for page in basis.v2p_map.values_mut() {
|
||||
|
|
|
|||
|
|
@ -410,6 +410,8 @@ fn xmain() -> ! {
|
|||
|
||||
// OS-specific PDDB driver
|
||||
let mut pddb_os = PddbOs::new(Rc::clone(&entropy));
|
||||
|
||||
// run the CI tests if the option has been selected
|
||||
#[cfg(all(
|
||||
not(any(target_os = "none", target_os = "xous")),
|
||||
feature = "ci"
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ use rand::prelude::*;
|
|||
use rand_chacha::ChaCha8Rng;
|
||||
use crate::*;
|
||||
use core::sync::atomic::{AtomicU64, Ordering};
|
||||
use std::collections::BTreeSet;
|
||||
use std::io::{Result, Error, ErrorKind};
|
||||
use std::collections::{BTreeSet, HashSet};
|
||||
use std::io::Result;
|
||||
|
||||
const UPPER_BOUND: usize = 9000;
|
||||
const LOWER_BOUND: usize = 12; // needs to be big enough to compute murmur3 hash + hold checksum
|
||||
|
|
@ -282,7 +282,7 @@ pub(crate) fn delete_pattern(hw: &mut PddbOs, basis_cache: &mut BasisCache,
|
|||
let (keyname, keydata) = gen_key(dictname, keynum, key_lower_bound, key_upper_bound);
|
||||
// now we're ready to write it out
|
||||
match basis_cache.key_attributes(hw, dictname, &keyname, None) {
|
||||
Ok(ka) => {
|
||||
Ok(_ka) => {
|
||||
log::warn!("rng collision on keygen: {}, deleting key", keyname);
|
||||
basis_cache.key_remove(hw, dictname, &keyname, None, false)?;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue