Skip to content

Commit d2776c6

Browse files
authored
Merge pull request #1134 from nicholasbishop/bishop-warnings-fixins-2
Fix some warnings, and ensure CI catches them in the future
2 parents a57d400 + 02baa0f commit d2776c6

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

.github/workflows/rust.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ on:
1111
- version-*
1212
schedule:
1313
- cron: '0 0 * * 0-6'
14+
env:
15+
RUSTFLAGS: -D warnings
1416
jobs:
1517
test_aarch64:
1618
name: Integration Test (AArch64)

uefi/src/helpers/mod.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,15 @@ pub fn init(st: &mut SystemTable<Boot>) -> Result<()> {
8383
// Setup the system table singleton
8484
SYSTEM_TABLE.store(st.as_ptr().cast_mut(), Ordering::Release);
8585

86-
unsafe {
87-
// Setup logging and memory allocation
86+
// Setup logging and memory allocation
8887

89-
#[cfg(feature = "logger")]
88+
#[cfg(feature = "logger")]
89+
unsafe {
9090
logger::init(st);
91+
}
9192

92-
#[cfg(feature = "global_allocator")]
93+
#[cfg(feature = "global_allocator")]
94+
unsafe {
9395
uefi::allocator::init(st);
9496
}
9597

uefi/src/table/boot.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1949,8 +1949,6 @@ mod tests {
19491949
use super::{MemoryDescriptor, MemoryMapIter};
19501950

19511951
fn buffer_to_map(buffer: &mut [MemoryDescriptor]) -> MemoryMap {
1952-
let desc_count = buffer.len();
1953-
19541952
let byte_buffer = {
19551953
unsafe {
19561954
core::slice::from_raw_parts_mut(buffer.as_mut_ptr() as *mut u8, size_of_val(buffer))

0 commit comments

Comments
 (0)