aboutsummaryrefslogtreecommitdiff
path: root/src/unix/fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/unix/fs.c')
-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);