prog_util: make it clear that posix_[fm]advise errors are ignored

This commit is contained in:
Eric Biggers 2021-03-13 09:54:32 -08:00
parent ea2f7569b0
commit fbada10aa9

View File

@ -186,7 +186,7 @@ xopen_for_read(const tchar *path, bool symlink_ok, struct file_stream *strm)
}
#if defined(HAVE_POSIX_FADVISE) && (O_SEQUENTIAL == 0)
posix_fadvise(strm->fd, 0, 0, POSIX_FADV_SEQUENTIAL);
(void)posix_fadvise(strm->fd, 0, 0, POSIX_FADV_SEQUENTIAL);
#endif
return 0;
@ -347,7 +347,7 @@ map_file_contents(struct file_stream *strm, u64 size)
}
#ifdef HAVE_POSIX_MADVISE
posix_madvise(strm->mmap_mem, size, POSIX_MADV_SEQUENTIAL);
(void)posix_madvise(strm->mmap_mem, size, POSIX_MADV_SEQUENTIAL);
#endif
strm->mmap_token = strm; /* anything that's not NULL */