From f33daa2cff42d94401a2eb512a9e0fcbb03f7e34 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 25 Nov 2022 09:09:01 -0500 Subject: Explicitly ignore posix_fadvise() return value If some error happened here, there's nothing we can do but proceed and try to copy anyway. --- src/posix/filesystem_posix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/posix') diff --git a/src/posix/filesystem_posix.c b/src/posix/filesystem_posix.c index a85fbd7..8d65611 100644 --- a/src/posix/filesystem_posix.c +++ b/src/posix/filesystem_posix.c @@ -209,8 +209,8 @@ zix_copy_file(ZixAllocator* const allocator, // Set sequential hints so the kernel can optimize the page cache #if USE_POSIX_FADVISE - posix_fadvise(src_fd, 0, src_stat.st_size, POSIX_FADV_SEQUENTIAL); - posix_fadvise(dst_fd, 0, src_stat.st_size, POSIX_FADV_SEQUENTIAL); + (void)posix_fadvise(src_fd, 0, src_stat.st_size, POSIX_FADV_SEQUENTIAL); + (void)posix_fadvise(dst_fd, 0, src_stat.st_size, POSIX_FADV_SEQUENTIAL); #endif errno = 0; -- cgit v1.2.1