add unused_must_use lint

This commit is contained in:
auronandace
2026-02-11 09:48:47 +00:00
parent 395c6ba33b
commit a3c67e898d
18 changed files with 43 additions and 43 deletions
+2 -2
View File
@@ -1060,7 +1060,7 @@ pub unsafe extern "C" fn symlink(path1: *const c_char, path2: *const c_char) ->
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/sync.html>.
#[unsafe(no_mangle)]
pub extern "C" fn sync() {
Sys::sync();
if let Ok(()) = Sys::sync() {}; // TODO handle error
}
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/tcgetpgrp.html>.
@@ -1094,7 +1094,7 @@ pub unsafe extern "C" fn truncate(path: *const c_char, length: off_t) -> c_int {
let res = ftruncate(fd, length);
Sys::close(fd);
if let Ok(()) = Sys::close(fd) {}; // TODO handle error
res
}