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 {
175
175
} ) )
176
176
}
177
177
178
+ #[ must_use]
178
179
fn read_more ( & mut self ) -> Option < io:: Result < ( ) > > {
179
180
// The first few times we're called, we allocate a relatively small
180
181
// 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() {
222
222
Ok ( buffer) => {
223
223
// SAFETY: We assume the kernel returns a valid auxv.
224
224
unsafe {
225
- init_from_aux_iter ( AuxPointer ( buffer. as_ptr ( ) . cast ( ) ) ) ;
225
+ init_from_aux_iter ( AuxPointer ( buffer. as_ptr ( ) . cast ( ) ) ) . unwrap ( ) ;
226
226
}
227
227
return ;
228
228
}
@@ -250,6 +250,7 @@ fn init_auxv() {
250
250
/// Process auxv entries from the open file `auxv`.
251
251
#[ cfg( feature = "alloc" ) ]
252
252
#[ cold]
253
+ #[ must_use]
253
254
fn init_from_auxv_file ( auxv : OwnedFd ) -> Option < ( ) > {
254
255
let mut buffer = Vec :: < u8 > :: with_capacity ( 512 ) ;
255
256
loop {
@@ -286,6 +287,7 @@ fn init_from_auxv_file(auxv: OwnedFd) -> Option<()> {
286
287
/// The buffer contains `Elf_aux_t` elements, though it need not be aligned;
287
288
/// function uses `read_unaligned` to read from it.
288
289
#[ cold]
290
+ #[ must_use]
289
291
unsafe fn init_from_aux_iter ( aux_iter : impl Iterator < Item = Elf_auxv_t > ) -> Option < ( ) > {
290
292
let mut pagesz = 0 ;
291
293
let mut clktck = 0 ;
@@ -396,6 +398,7 @@ unsafe fn init_from_aux_iter(aux_iter: impl Iterator<Item = Elf_auxv_t>) -> Opti
396
398
/// which hopefully holds the value of the kernel-provided vDSO in memory. Do a
397
399
/// series of checks to be as sure as we can that it's safe to use.
398
400
#[ cold]
401
+ #[ must_use]
399
402
unsafe fn check_elf_base ( base : * const Elf_Ehdr ) -> Option < NonNull < Elf_Ehdr > > {
400
403
// If we're reading a 64-bit auxv on a 32-bit platform, we'll see a zero
401
404
// `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