misc warning fixes

this concludes the fix warnings phase of the cleanup
This commit is contained in:
TheOddGarlic 2022-08-01 14:50:41 +03:00
parent 34a701bd5c
commit 69c10e0ba4
14 changed files with 20 additions and 33 deletions

View file

@ -10,8 +10,8 @@ const BLOCK_SIZE: usize = 1024;
const BLOCK_COUNT: usize = 512;
#[derive(Debug, Clone, Copy)]
pub struct MemoryRegion {
start: usize,
end: usize,
_start: usize,
_end: usize,
}
#[derive(Debug, Clone, Copy)]
pub struct AAlloc {
@ -36,8 +36,8 @@ impl AAlloc {
};
aalloc.add_region(MemoryRegion {
start: 0x00100000,
end: 0x00EFFFFF,
_start: 0x00100000,
_end: 0x00EFFFFF,
});
debug!("{}", aalloc);
}

View file

@ -2,8 +2,6 @@
// Copyright (c) 2021 trashbyte
// See LICENSE.txt for full license
#![feature(asm)]
extern crate alloc;
use alloc::{format, string::String, vec::Vec};
use core::fmt::{Display, Error, Formatter};

View file

@ -6,8 +6,8 @@ use core::fmt::Display;
#[derive(Debug)]
pub struct BinaryData {
name: String,
data: Vec<u8>,
_name: String,
_data: Vec<u8>,
}
#[derive(Debug, Eq, Hash, PartialEq, Clone, Copy)]

View file

@ -16,7 +16,7 @@ pub struct ChannelPermission {
#[derive(Debug)]
pub struct Channel {
pub public: bool,
name: String,
_name: String,
inner: VecDeque<ChannelMessage>,
}
@ -26,7 +26,7 @@ impl Channel {
Self {
public,
name: name.into(),
_name: name.into(),
inner: deq,
}
}

View file

@ -1,3 +1,5 @@
#![allow(dead_code)]
pub const CONSOLE: &str = "\u{E795}";
pub const POWER_SIGN: &str = "\u{23FB}";
pub const LAMBDA: &str = "λ";

View file

@ -6,7 +6,7 @@
//! <https://docs.oasis-open.org/virtio/virtio/v1.1/csprd01/virtio-v1.1-csprd01.html#x1-20001>
pub struct VirtioDevice {
status: VirtioDeviceStatus,
_status: VirtioDeviceStatus,
}
use crate::devices::pci::PciDeviceInfo;

View file

@ -2,7 +2,7 @@ use crate::vga_e::VGAE;
use vga::{colors::Color16, writers::GraphicsWriter};
const TERM_MINUS_ONE_LINE: usize = 4720;
const CURSOR_COLOR: Color16 = Color16::Cyan;
// const CURSOR_COLOR: Color16 = Color16::Cyan;
#[derive(Debug)]
pub struct Term {

View file

@ -44,8 +44,8 @@ pub enum SectionType {
pub struct Section {
/// The section type
stype: SectionType,
section_size: u8,
_stype: SectionType,
_section_size: u8,
}
/// A wasm type

View file

@ -114,10 +114,7 @@ pub fn run_program(program: &[u8]) {
match instance {
Ok(inst) => {
let mut instance = inst.assert_no_start();
let abc = instance.globals().capacity();
let instance = inst.assert_no_start();
let mut is_driver = false;
let _is_program = false;
let mut has_driver_entry = false;

View file

@ -3,7 +3,6 @@
#![deny(missing_docs)]
#![feature(
min_specialization,
const_fn_trait_bound,
step_trait,
associated_type_defaults
)]

View file

@ -5,11 +5,8 @@
#![allow(missing_docs)]
use alloc::alloc::{GlobalAlloc, Layout};
use core::{
fmt::Display,
ptr::{self, null_mut},
};
use log::{debug, info, trace};
use core::{fmt::Display, ptr::null_mut};
use log::{debug, info};
// const HEAP_START: usize = 600_000_000;
const HEAP_START: usize = 0x00100000;

View file

@ -18,10 +18,7 @@ pub mod proccess;
pub mod syscalls;
pub mod time;
use core::{
arch::asm,
sync::atomic::{AtomicU64, Ordering::Relaxed},
};
use core::arch::asm;
use versioning::Version;
/// The number of ticks since the first CPU was started

View file

@ -36,6 +36,7 @@ impl<T> ExpectOrOverflow for Option<T> {
macro_rules! impl_as {
($ty:ty) => {
#[allow(unconditional_recursion)] // idk why
#[cfg(debug_assertions)]
impl As for $ty {
fn as_u16(self) -> u16 {

View file

@ -1,11 +1,7 @@
//! UTF-8 rendering, with 2 pixels per symbol.
use alloc::{
string::String,
vec::{self, Vec},
};
use crate::render::{Canvas as RenderCanvas, Color, Pixel};
use alloc::{string::String, vec::Vec};
const CODEPAGE: [&str; 4] = [" ", "\u{2584}", "\u{2580}", "\u{2588}"];