From 4846ad5212db89b9e72abee8da69ba87de65b113 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 24 Nov 2022 16:40:44 -0500 Subject: Explicitly ignore the posix_fadvise() return value I can't figure out a sensible way to test this, and even if it did fail, at most a warning message could be printed because this is just a performance hint anyway. --- src/serdi.c | 3 ++- src/system.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/serdi.c b/src/serdi.c index f3f7ca54..097226e4 100644 --- a/src/serdi.c +++ b/src/serdi.c @@ -132,7 +132,8 @@ serd_fopen(const char* const path, const char* const mode) } #if USE_POSIX_FADVISE && USE_FILENO - posix_fadvise(fileno(fd), 0, 0, POSIX_FADV_SEQUENTIAL | POSIX_FADV_NOREUSE); + (void)posix_fadvise( + fileno(fd), 0, 0, POSIX_FADV_SEQUENTIAL | POSIX_FADV_NOREUSE); #endif return fd; diff --git a/src/system.c b/src/system.c index 2058cfe2..072d2ed5 100644 --- a/src/system.c +++ b/src/system.c @@ -30,7 +30,7 @@ serd_fopen(const char* const path, const char* const mode) } #if USE_POSIX_FADVISE && USE_FILENO - posix_fadvise(fileno(fd), 0, 0, POSIX_FADV_SEQUENTIAL); + (void)posix_fadvise(fileno(fd), 0, 0, POSIX_FADV_SEQUENTIAL); #endif return fd; } -- cgit v1.2.1