[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] acl: fix missing return on Cygwin
From: |
Eric Blake |
Subject: |
[PATCH] acl: fix missing return on Cygwin |
Date: |
Tue, 8 Mar 2016 15:46:17 -0700 |
Compilation on Cygwin 2.4.1 resulted in an 'install' that behaved
differently depending on compile-time flags; I traced it to this
warning, where the difference was based on what was left in the
return register:
lib/set-permissions.c: In function 'set_acls_from_mode':
lib/set-permissions.c:273:1: warning: control reaches end of non-void
function [-Wreturn-type]
* lib/set-permissions.c (set_acls) [HAVE_FACL && GETACL]: Don't
fall off end of function. Fixes http://bugs.gnu.org/22949
Signed-off-by: Eric Blake <address@hidden>
---
This passed my testing on Cygwin; the #ifdef nest wasn't as
bad as I had been worried about. Now pushed.
ChangeLog | 6 ++++++
lib/set-permissions.c | 1 +
2 files changed, 7 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 8634579..b81076f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-03-08 Eric Blake <address@hidden>
+
+ acl: fix missing return on Cygwin
+ * lib/set-permissions.c (set_acls) [HAVE_FACL && GETACL]: Don't
+ fall off end of function. Fixes http://bugs.gnu.org/22949
+
2016-02-20 Paul Eggert <address@hidden>
signbit: port back to pre-C++11 GCC
diff --git a/lib/set-permissions.c b/lib/set-permissions.c
index 0730754..2c77356 100644
--- a/lib/set-permissions.c
+++ b/lib/set-permissions.c
@@ -269,6 +269,7 @@ set_acls_from_mode (const char *name, int desc, mode_t
mode, bool *must_chmod)
}
return -1;
}
+ return 0;
}
}
--
2.5.0