From fbada10aa9da4ed8145a026a80cedff9601fb874 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sat, 13 Mar 2021 09:54:32 -0800 Subject: [PATCH] prog_util: make it clear that posix_[fm]advise errors are ignored --- programs/prog_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/prog_util.c b/programs/prog_util.c index 54107b2..3438281 100644 --- a/programs/prog_util.c +++ b/programs/prog_util.c @@ -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 */