misc warning fixes
this concludes the fix warnings phase of the cleanup
This commit is contained in:
parent
34a701bd5c
commit
69c10e0ba4
|
@ -10,8 +10,8 @@ const BLOCK_SIZE: usize = 1024;
|
||||||
const BLOCK_COUNT: usize = 512;
|
const BLOCK_COUNT: usize = 512;
|
||||||
#[derive(Debug, Clone, Copy)]
|
#[derive(Debug, Clone, Copy)]
|
||||||
pub struct MemoryRegion {
|
pub struct MemoryRegion {
|
||||||
start: usize,
|
_start: usize,
|
||||||
end: usize,
|
_end: usize,
|
||||||
}
|
}
|
||||||
#[derive(Debug, Clone, Copy)]
|
#[derive(Debug, Clone, Copy)]
|
||||||
pub struct AAlloc {
|
pub struct AAlloc {
|
||||||
|
@ -36,8 +36,8 @@ impl AAlloc {
|
||||||
};
|
};
|
||||||
|
|
||||||
aalloc.add_region(MemoryRegion {
|
aalloc.add_region(MemoryRegion {
|
||||||
start: 0x00100000,
|
_start: 0x00100000,
|
||||||
end: 0x00EFFFFF,
|
_end: 0x00EFFFFF,
|
||||||
});
|
});
|
||||||
debug!("{}", aalloc);
|
debug!("{}", aalloc);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
// Copyright (c) 2021 trashbyte
|
// Copyright (c) 2021 trashbyte
|
||||||
// See LICENSE.txt for full license
|
// See LICENSE.txt for full license
|
||||||
|
|
||||||
#![feature(asm)]
|
|
||||||
|
|
||||||
extern crate alloc;
|
extern crate alloc;
|
||||||
use alloc::{format, string::String, vec::Vec};
|
use alloc::{format, string::String, vec::Vec};
|
||||||
use core::fmt::{Display, Error, Formatter};
|
use core::fmt::{Display, Error, Formatter};
|
||||||
|
|
|
@ -6,8 +6,8 @@ use core::fmt::Display;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct BinaryData {
|
pub struct BinaryData {
|
||||||
name: String,
|
_name: String,
|
||||||
data: Vec<u8>,
|
_data: Vec<u8>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Eq, Hash, PartialEq, Clone, Copy)]
|
#[derive(Debug, Eq, Hash, PartialEq, Clone, Copy)]
|
||||||
|
|
|
@ -16,7 +16,7 @@ pub struct ChannelPermission {
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Channel {
|
pub struct Channel {
|
||||||
pub public: bool,
|
pub public: bool,
|
||||||
name: String,
|
_name: String,
|
||||||
inner: VecDeque<ChannelMessage>,
|
inner: VecDeque<ChannelMessage>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ impl Channel {
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
public,
|
public,
|
||||||
name: name.into(),
|
_name: name.into(),
|
||||||
inner: deq,
|
inner: deq,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#![allow(dead_code)]
|
||||||
|
|
||||||
pub const CONSOLE: &str = "\u{E795}";
|
pub const CONSOLE: &str = "\u{E795}";
|
||||||
pub const POWER_SIGN: &str = "\u{23FB}";
|
pub const POWER_SIGN: &str = "\u{23FB}";
|
||||||
pub const LAMBDA: &str = "λ";
|
pub const LAMBDA: &str = "λ";
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
//! <https://docs.oasis-open.org/virtio/virtio/v1.1/csprd01/virtio-v1.1-csprd01.html#x1-20001>
|
//! <https://docs.oasis-open.org/virtio/virtio/v1.1/csprd01/virtio-v1.1-csprd01.html#x1-20001>
|
||||||
|
|
||||||
pub struct VirtioDevice {
|
pub struct VirtioDevice {
|
||||||
status: VirtioDeviceStatus,
|
_status: VirtioDeviceStatus,
|
||||||
}
|
}
|
||||||
|
|
||||||
use crate::devices::pci::PciDeviceInfo;
|
use crate::devices::pci::PciDeviceInfo;
|
||||||
|
|
|
@ -2,7 +2,7 @@ use crate::vga_e::VGAE;
|
||||||
use vga::{colors::Color16, writers::GraphicsWriter};
|
use vga::{colors::Color16, writers::GraphicsWriter};
|
||||||
|
|
||||||
const TERM_MINUS_ONE_LINE: usize = 4720;
|
const TERM_MINUS_ONE_LINE: usize = 4720;
|
||||||
const CURSOR_COLOR: Color16 = Color16::Cyan;
|
// const CURSOR_COLOR: Color16 = Color16::Cyan;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Term {
|
pub struct Term {
|
||||||
|
|
|
@ -44,8 +44,8 @@ pub enum SectionType {
|
||||||
|
|
||||||
pub struct Section {
|
pub struct Section {
|
||||||
/// The section type
|
/// The section type
|
||||||
stype: SectionType,
|
_stype: SectionType,
|
||||||
section_size: u8,
|
_section_size: u8,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A wasm type
|
/// A wasm type
|
||||||
|
|
|
@ -114,10 +114,7 @@ pub fn run_program(program: &[u8]) {
|
||||||
|
|
||||||
match instance {
|
match instance {
|
||||||
Ok(inst) => {
|
Ok(inst) => {
|
||||||
let mut instance = inst.assert_no_start();
|
let instance = inst.assert_no_start();
|
||||||
|
|
||||||
let abc = instance.globals().capacity();
|
|
||||||
|
|
||||||
let mut is_driver = false;
|
let mut is_driver = false;
|
||||||
let _is_program = false;
|
let _is_program = false;
|
||||||
let mut has_driver_entry = false;
|
let mut has_driver_entry = false;
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
#![deny(missing_docs)]
|
#![deny(missing_docs)]
|
||||||
#![feature(
|
#![feature(
|
||||||
min_specialization,
|
min_specialization,
|
||||||
const_fn_trait_bound,
|
|
||||||
step_trait,
|
step_trait,
|
||||||
associated_type_defaults
|
associated_type_defaults
|
||||||
)]
|
)]
|
||||||
|
|
|
@ -5,11 +5,8 @@
|
||||||
#![allow(missing_docs)]
|
#![allow(missing_docs)]
|
||||||
|
|
||||||
use alloc::alloc::{GlobalAlloc, Layout};
|
use alloc::alloc::{GlobalAlloc, Layout};
|
||||||
use core::{
|
use core::{fmt::Display, ptr::null_mut};
|
||||||
fmt::Display,
|
use log::{debug, info};
|
||||||
ptr::{self, null_mut},
|
|
||||||
};
|
|
||||||
use log::{debug, info, trace};
|
|
||||||
|
|
||||||
// const HEAP_START: usize = 600_000_000;
|
// const HEAP_START: usize = 600_000_000;
|
||||||
const HEAP_START: usize = 0x00100000;
|
const HEAP_START: usize = 0x00100000;
|
||||||
|
|
|
@ -18,10 +18,7 @@ pub mod proccess;
|
||||||
pub mod syscalls;
|
pub mod syscalls;
|
||||||
pub mod time;
|
pub mod time;
|
||||||
|
|
||||||
use core::{
|
use core::arch::asm;
|
||||||
arch::asm,
|
|
||||||
sync::atomic::{AtomicU64, Ordering::Relaxed},
|
|
||||||
};
|
|
||||||
use versioning::Version;
|
use versioning::Version;
|
||||||
|
|
||||||
/// The number of ticks since the first CPU was started
|
/// The number of ticks since the first CPU was started
|
||||||
|
|
|
@ -36,6 +36,7 @@ impl<T> ExpectOrOverflow for Option<T> {
|
||||||
|
|
||||||
macro_rules! impl_as {
|
macro_rules! impl_as {
|
||||||
($ty:ty) => {
|
($ty:ty) => {
|
||||||
|
#[allow(unconditional_recursion)] // idk why
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
impl As for $ty {
|
impl As for $ty {
|
||||||
fn as_u16(self) -> u16 {
|
fn as_u16(self) -> u16 {
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
//! UTF-8 rendering, with 2 pixels per symbol.
|
//! UTF-8 rendering, with 2 pixels per symbol.
|
||||||
|
|
||||||
use alloc::{
|
|
||||||
string::String,
|
|
||||||
vec::{self, Vec},
|
|
||||||
};
|
|
||||||
|
|
||||||
use crate::render::{Canvas as RenderCanvas, Color, Pixel};
|
use crate::render::{Canvas as RenderCanvas, Color, Pixel};
|
||||||
|
use alloc::{string::String, vec::Vec};
|
||||||
|
|
||||||
const CODEPAGE: [&str; 4] = [" ", "\u{2584}", "\u{2580}", "\u{2588}"];
|
const CODEPAGE: [&str; 4] = [" ", "\u{2584}", "\u{2580}", "\u{2588}"];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue