From 3e53f0062f2a5821f70ab0104ab15cc58a3e6ed3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 6 Jun 2015 18:20:40 -0700 Subject: [PATCH] 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)). --- ChangeLog | 6 ++++++ lib/acl-internal.h | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a215c03d12..64b9de13cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2015-06-06 Paul Eggert + 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. diff --git a/lib/acl-internal.h b/lib/acl-internal.h index 11fdea1404..d592a7559f 100644 --- a/lib/acl-internal.h +++ b/lib/acl-internal.h @@ -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 -- 2.39.5