add unused_must_use lint
This commit is contained in:
@@ -580,7 +580,7 @@ pub unsafe extern "C" fn fopen(filename: *const c_char, mode: *const c_char) ->
|
||||
.map(|f| Box::into_raw(f))
|
||||
.map_err(|err| {
|
||||
// TODO: guard type
|
||||
Sys::close(fd);
|
||||
if let Ok(()) = Sys::close(fd) {}; // TODO handle error
|
||||
err
|
||||
})
|
||||
.or_errno_null_mut()
|
||||
@@ -1320,11 +1320,11 @@ pub unsafe extern "C" fn tmpfile() -> *mut FILE {
|
||||
let fp = unsafe { fdopen(fd, c"w+".as_ptr()) };
|
||||
{
|
||||
let file_name = unsafe { CStr::from_ptr(file_name) };
|
||||
Sys::unlink(file_name);
|
||||
if let Ok(()) = Sys::unlink(file_name) {}; // TODO handle error
|
||||
}
|
||||
|
||||
if fp.is_null() {
|
||||
Sys::close(fd);
|
||||
if let Ok(()) = Sys::close(fd) {}; // TODO handle error
|
||||
}
|
||||
|
||||
fp
|
||||
|
||||
@@ -697,7 +697,7 @@ pub(crate) unsafe fn inner_printf<T: c_str::Kind>(
|
||||
} else {
|
||||
// TODO: wcsrtombs wrapper
|
||||
for c in text.iter().filter_map(|u| char::from_u32((*u).into())) {
|
||||
write!(w, "{}", c);
|
||||
if let Ok(()) = write!(w, "{}", c) {}; // TODO handle error
|
||||
}
|
||||
}
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user