File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -175,6 +175,7 @@ impl Dir {
175175 } ) )
176176 }
177177
178+ #[ must_use]
178179 fn read_more ( & mut self ) -> Option < io:: Result < ( ) > > {
179180 // The first few times we're called, we allocate a relatively small
180181 // buffer, because many directories are small. If we're called more,
Original file line number Diff line number Diff line change @@ -222,7 +222,7 @@ fn init_auxv() {
222222 Ok ( buffer) => {
223223 // SAFETY: We assume the kernel returns a valid auxv.
224224 unsafe {
225- init_from_aux_iter ( AuxPointer ( buffer. as_ptr ( ) . cast ( ) ) ) ;
225+ init_from_aux_iter ( AuxPointer ( buffer. as_ptr ( ) . cast ( ) ) ) . unwrap ( ) ;
226226 }
227227 return ;
228228 }
@@ -250,6 +250,7 @@ fn init_auxv() {
250250/// Process auxv entries from the open file `auxv`.
251251#[ cfg( feature = "alloc" ) ]
252252#[ cold]
253+ #[ must_use]
253254fn init_from_auxv_file ( auxv : OwnedFd ) -> Option < ( ) > {
254255 let mut buffer = Vec :: < u8 > :: with_capacity ( 512 ) ;
255256 loop {
@@ -286,6 +287,7 @@ fn init_from_auxv_file(auxv: OwnedFd) -> Option<()> {
286287/// The buffer contains `Elf_aux_t` elements, though it need not be aligned;
287288/// function uses `read_unaligned` to read from it.
288289#[ cold]
290+ #[ must_use]
289291unsafe fn init_from_aux_iter ( aux_iter : impl Iterator < Item = Elf_auxv_t > ) -> Option < ( ) > {
290292 let mut pagesz = 0 ;
291293 let mut clktck = 0 ;
@@ -396,6 +398,7 @@ unsafe fn init_from_aux_iter(aux_iter: impl Iterator<Item = Elf_auxv_t>) -> Opti
396398/// which hopefully holds the value of the kernel-provided vDSO in memory. Do a
397399/// series of checks to be as sure as we can that it's safe to use.
398400#[ cold]
401+ #[ must_use]
399402unsafe fn check_elf_base ( base : * const Elf_Ehdr ) -> Option < NonNull < Elf_Ehdr > > {
400403 // If we're reading a 64-bit auxv on a 32-bit platform, we'll see a zero
401404 // `a_val` because `AT_*` values are never greater than `u32::MAX`. Zero is
You can’t perform that action at this time.
0 commit comments