From: Eric Blake Date: Tue, 8 Mar 2016 22:35:30 +0000 (-0700) Subject: acl: fix missing return on Cygwin X-Git-Tag: v1.0~6796 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=bdb72bc645460210bb85f2a5690640a2976f41b0;p=gnulib.git acl: fix missing return on Cygwin 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 --- diff --git a/ChangeLog b/ChangeLog index 2ccfcb765f..139f6436e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2016-03-08 Eric Blake + + 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-03-05 Bruno Haible extern-inline: port to PGI CC diff --git a/lib/set-permissions.c b/lib/set-permissions.c index 073075434d..2c773567cd 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; } }