chore: make compiler happy

This commit is contained in:
Paul Pan 2024-08-02 14:09:21 +08:00
parent 272fdf303c
commit 08f9374c8b
5 changed files with 8 additions and 9 deletions

6
Cargo.lock generated
View File

@ -37,9 +37,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]] [[package]]
name = "bitflags" name = "bitflags"
version = "2.5.0" version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
[[package]] [[package]]
name = "cfg-if" name = "cfg-if"
@ -101,7 +101,7 @@ name = "kernel"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"allocator", "allocator",
"bitflags 2.5.0", "bitflags 2.6.0",
"cfg-if", "cfg-if",
"cpio", "cpio",
"elf", "elf",

View File

@ -26,7 +26,7 @@ tracer = { path = "../lib/tracer" }
uapi = { path = "../uapi" } uapi = { path = "../uapi" }
utils = { path = "../lib/utils", default-features = false } utils = { path = "../lib/utils", default-features = false }
bitflags = "2.5" bitflags = "2.6"
cfg-if = "1.0" cfg-if = "1.0"
elf = { version = "0.7", default-features = false } elf = { version = "0.7", default-features = false }
fdt = { git = "https://github.com/panpaul/fdt.git" } # fork from upstream fdt = { git = "https://github.com/panpaul/fdt.git" } # fork from upstream

View File

@ -26,8 +26,8 @@ unsafe extern "C" fn _start(hart_id: usize, fdt_addr: usize) -> ! {
.option push .option push
.option norelax .option norelax
1: auipc gp, %pcrel_hi(__global_pointer$) 2: auipc gp, %pcrel_hi(__global_pointer$)
addi gp, gp, %pcrel_lo(1b) addi gp, gp, %pcrel_lo(2b)
.option pop .option pop
lla t0, KERNEL_OFFSET lla t0, KERNEL_OFFSET

View File

@ -38,8 +38,8 @@ extern "C" fn idle_thread() {
unsafe { unsafe {
core::arch::asm!( core::arch::asm!(
" "
1: wfi 2: wfi
j 1b j 2b
", ",
options(noreturn) options(noreturn)
) )

View File

@ -151,7 +151,6 @@ impl Debug for CNodeCap<'_> {
mod tests { mod tests {
use super::*; use super::*;
use crate::arch::vspace::RAM_ALLOCATOR; use crate::arch::vspace::RAM_ALLOCATOR;
use crate::objects::*;
use core::alloc::Layout; use core::alloc::Layout;
use log::info; use log::info;