]> Savannah Git Hosting - gnulib.git/commitdiff
acl: fix missing return on Cygwin
authorEric Blake <eblake@redhat.com>
Tue, 8 Mar 2016 22:35:30 +0000 (15:35 -0700)
committerEric Blake <eblake@redhat.com>
Tue, 8 Mar 2016 22:46:41 +0000 (15:46 -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 <eblake@redhat.com>
ChangeLog
lib/set-permissions.c

index 2ccfcb765ff20c6babd6c7cfbd55031e4d21828e..139f6436e8ec58d2e0bf92decf58b8f1b46617b4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-03-08  Eric Blake  <eblake@redhat.com>
+
+       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  <bruno@clisp.org>
 
        extern-inline: port to PGI CC
index 073075434d6c1aebbbdc5bba78be217ef08eb869..2c773567cd60474e7ff089d0511173297b4ab99e 100644 (file)
@@ -269,6 +269,7 @@ set_acls_from_mode (const char *name, int desc, mode_t mode, bool *must_chmod)
          }
        return -1;
       }
+    return 0;
   }
 }