Skip to content

Fix some warnings, and ensure CI catches them in the future #1134

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:
- version-*
schedule:
- cron: '0 0 * * 0-6'
env:
RUSTFLAGS: -D warnings
jobs:
test_aarch64:
name: Integration Test (AArch64)
Expand Down
10 changes: 6 additions & 4 deletions uefi/src/helpers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,15 @@ pub fn init(st: &mut SystemTable<Boot>) -> 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);
}

Expand Down
2 changes: 0 additions & 2 deletions uefi/src/table/boot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down