]> Savannah Git Hosting - gnulib.git/commitdiff
acl-permissions: pacify -Wsuggest-attribute=const
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 7 Jun 2015 01:20:40 +0000 (18:20 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 7 Jun 2015 01:21:23 +0000 (18:21 -0700)
Problem reported by Masanari Iida in: http://bugs.gnu.org/20753
* lib/acl-internal.h (free_permission_context):
Declare with attribute const if ! (defined USE_ACL &&
(HAVE_ACL_GET_FILE || defined GETACL)).

ChangeLog
lib/acl-internal.h

index a215c03d1293c7e70d32e66c6a55b4288c3b6f3a..64b9de13cc2fa1a7a6e504f1249984067e4b47e9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2015-06-06  Paul Eggert  <eggert@cs.ucla.edu>
 
+       acl-permissions: pacify -Wsuggest-attribute=const
+       Problem reported by Masanari Iida in: http://bugs.gnu.org/20753
+       * lib/acl-internal.h (free_permission_context):
+       Declare with attribute const if ! (defined USE_ACL &&
+       (HAVE_ACL_GET_FILE || defined GETACL)).
+
        fsync: document AIX misbehavior
        * doc/posix-functions/fsync.texi (fsync):
        Document failure on AIX with read-only file descriptor.
index 11fdea140426c4ae061e07306db8feaebf6a2401..d592a7559f01b888199df626136ce040c290dcdd 100644 (file)
@@ -289,6 +289,10 @@ struct permission_context {
 
 int get_permissions (const char *, int, mode_t, struct permission_context *);
 int set_permissions (struct permission_context *, const char *, int);
-void free_permission_context (struct permission_context *);
+void free_permission_context (struct permission_context *)
+#if ! (defined USE_ACL && (HAVE_ACL_GET_FILE || defined GETACL))
+    _GL_ATTRIBUTE_CONST
+#endif
+  ;
 
 _GL_INLINE_HEADER_END