aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSantiago Gimeno <santiago.gimeno@gmail.com>2024-08-10 11:08:39 +0200
committerGitHub <noreply@github.com>2024-08-10 11:08:39 +0200
commita53e7877e46f55bd79e60f82353361f9c10d8866 (patch)
treee76c0ca10e11e0039fa3e61a51788998d937788e /src
parentc84a2dbe03da6e115aa18fb866df1c88782bb1fe (diff)
downloadlibuv-a53e7877e46f55bd79e60f82353361f9c10d8866.tar.gz
libuv-a53e7877e46f55bd79e60f82353361f9c10d8866.zip
unix,fs: silence -Wunused-result warning (#4496)
Diffstat (limited to 'src')
-rw-r--r--src/unix/fs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/unix/fs.c b/src/unix/fs.c
index aad55fed..4a4e2e3a 100644
--- a/src/unix/fs.c
+++ b/src/unix/fs.c
@@ -1338,9 +1338,10 @@ static ssize_t uv__fs_copyfile(uv_fs_t* req) {
/*
* Change the ownership and permissions of the destination file to match the
* source file.
- * `cp -p` does not care about errors here, so we don't either.
+ * `cp -p` does not care about errors here, so we don't either. Reuse the
+ * `result` variable to silence a -Wunused-result warning.
*/
- fchown(dstfd, src_statsbuf.st_uid, src_statsbuf.st_gid);
+ result = fchown(dstfd, src_statsbuf.st_uid, src_statsbuf.st_gid);
if (fchmod(dstfd, src_statsbuf.st_mode) == -1) {
err = UV__ERR(errno);