This is useful for Emacs when compiled with -Wunused-parameter. * lib/acl-internal.c (free_permission_context): * lib/get-permissions.c (get_permissions): Use _GL_UNSUED for arguments that might not be used, depending on compile-time options. --- ChangeLog | 9 +++++++++ lib/acl-internal.c | 2 +- lib/get-permissions.c | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog index 3117d3431f..30a6b6ea31 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2026-10-25 Paul Eggert <[email protected]> + + acl-permissions: use _GL_UNUSED + This is useful for Emacs when compiled with -Wunused-parameter. + * lib/acl-internal.c (free_permission_context): + * lib/get-permissions.c (get_permissions): + Use _GL_UNUSED for arguments that might not be used, depending on + compile-time options. + 2026-10-25 Eric Cai <[email protected]> (tiny change) qcopy-acl: Fix handling of file descriptor 0. diff --git a/lib/acl-internal.c b/lib/acl-internal.c index e012cc64bb..b63ea78fe3 100644 --- a/lib/acl-internal.c +++ b/lib/acl-internal.c @@ -492,7 +492,7 @@ acl_nontrivial (int count, struct acl const *entries) #endif void -free_permission_context (struct permission_context *ctx) +free_permission_context (_GL_UNUSED struct permission_context *ctx) { #if USE_ACL # if HAVE_ACL_GET_FILE /* Linux, FreeBSD, NetBSD >= 10, Mac OS X, Cygwin >= 2.5 */ diff --git a/lib/get-permissions.c b/lib/get-permissions.c index 91a3bf8b2e..3d744c1cf6 100644 --- a/lib/get-permissions.c +++ b/lib/get-permissions.c @@ -30,7 +30,7 @@ Return 0 if successful. Return -1 and set errno upon failure. */ int -get_permissions (const char *name, int desc, mode_t mode, +get_permissions (_GL_UNUSED const char *name, _GL_UNUSED int desc, mode_t mode, struct permission_context *ctx) { memset (ctx, 0, sizeof *ctx); -- 2.56.0
