diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 667eea9cd..5436a4086 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -11,6 +11,8 @@ on: - version-* schedule: - cron: '0 0 * * 0-6' +env: + RUSTFLAGS: -D warnings jobs: test_aarch64: name: Integration Test (AArch64) diff --git a/uefi/src/helpers/mod.rs b/uefi/src/helpers/mod.rs index 0f31f765a..0a757b615 100644 --- a/uefi/src/helpers/mod.rs +++ b/uefi/src/helpers/mod.rs @@ -83,13 +83,15 @@ pub fn init(st: &mut SystemTable) -> Result<()> { // Setup the system table singleton SYSTEM_TABLE.store(st.as_ptr().cast_mut(), Ordering::Release); - unsafe { - // Setup logging and memory allocation + // Setup logging and memory allocation - #[cfg(feature = "logger")] + #[cfg(feature = "logger")] + unsafe { logger::init(st); + } - #[cfg(feature = "global_allocator")] + #[cfg(feature = "global_allocator")] + unsafe { uefi::allocator::init(st); } diff --git a/uefi/src/table/boot.rs b/uefi/src/table/boot.rs index ea6b1e63f..6dbfb0bd1 100644 --- a/uefi/src/table/boot.rs +++ b/uefi/src/table/boot.rs @@ -1949,8 +1949,6 @@ mod tests { use super::{MemoryDescriptor, MemoryMapIter}; fn buffer_to_map(buffer: &mut [MemoryDescriptor]) -> MemoryMap { - let desc_count = buffer.len(); - let byte_buffer = { unsafe { core::slice::from_raw_parts_mut(buffer.as_mut_ptr() as *mut u8, size_of_val(buffer))