From 13ade5e4a2904669cbfb6e6405b7403e9671886f Mon Sep 17 00:00:00 2001 From: Nick Spinale Date: Wed, 28 Feb 2024 23:42:36 +0000 Subject: [PATCH] Address warnings Signed-off-by: Nick Spinale --- crates/sel4-initialize-tls/src/lib.rs | 3 ++- crates/sel4-runtime-common/src/lib.rs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/sel4-initialize-tls/src/lib.rs b/crates/sel4-initialize-tls/src/lib.rs index cde67b1ad..ac619f124 100644 --- a/crates/sel4-initialize-tls/src/lib.rs +++ b/crates/sel4-initialize-tls/src/lib.rs @@ -77,6 +77,7 @@ impl TlsImage { Layout::from_size_align(self.memsz, self.align).unwrap() } + #[allow(clippy::missing_safety_doc)] pub unsafe fn initialize_tls_reservation(&self, tls_reservation_start: *mut u8) { let reservation_layout = self.reservation_layout(); @@ -84,7 +85,7 @@ impl TlsImage { let segment_start = tls_reservation_start.wrapping_byte_add(reservation_layout.segment_offset()); - let segment_window = slice::from_raw_parts_mut(segment_start as *mut u8, self.memsz); + let segment_window = slice::from_raw_parts_mut(segment_start, self.memsz); let (tdata, tbss) = segment_window.split_at_mut(self.filesz); tdata.copy_from_slice(image_data_window); diff --git a/crates/sel4-runtime-common/src/lib.rs b/crates/sel4-runtime-common/src/lib.rs index 832599ed7..8ff3699e0 100644 --- a/crates/sel4-runtime-common/src/lib.rs +++ b/crates/sel4-runtime-common/src/lib.rs @@ -29,6 +29,7 @@ mod unwinding; #[cfg(all(feature = "unwinding", panic = "unwind"))] pub use self::unwinding::set_eh_frame_finder; +#[allow(dead_code)] pub(crate) fn locate_phdrs() -> &'static [ProgramHeader] { extern "C" { static __ehdr_start: ElfHeader;