Skip to content

Commit

Permalink
Address warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Spinale <[email protected]>
  • Loading branch information
nspin committed Feb 29, 2024
1 parent ae1fe8b commit 13ade5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/sel4-initialize-tls/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,15 @@ 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();

let image_data_window = slice::from_raw_parts(self.vaddr as *mut u8, self.filesz);

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);
Expand Down
1 change: 1 addition & 0 deletions crates/sel4-runtime-common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 13ade5e

Please sign in to comment.