From ea7ae28b10edc146f415eab05dd55326cfd69032 Mon Sep 17 00:00:00 2001 From: =?utf8?q?P=C3=A1draig=20Brady?=
Date: Thu, 3 May 2018 18:56:30 -0700 Subject: [PATCH] build: make GCC 8 adjustments more portable * src/chown-core.h (chopt_free): Just define away this noop. * src/chown-core.c (chopt_free): Remove the empty implementation. --- src/chown-core.c | 7 ------- src/chown-core.h | 10 +++++++--- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/chown-core.c b/src/chown-core.c index 818ee0ff15..c235ef3916 100644 --- a/src/chown-core.c +++ b/src/chown-core.c @@ -66,13 +66,6 @@ chopt_init (struct Chown_option *chopt) chopt->group_name = NULL; } -extern void -chopt_free (struct Chown_option *chopt _GL_UNUSED) -{ - /* Deliberately do not free chopt->user_name or ->group_name. - They're not always allocated. */ -} - /* Convert the numeric group-id, GID, to a string stored in xmalloc'd memory, and return it. If there's no corresponding group name, use the decimal representation of the ID. */ diff --git a/src/chown-core.h b/src/chown-core.h index 346b1cea4a..c410158a6f 100644 --- a/src/chown-core.h +++ b/src/chown-core.h @@ -68,11 +68,15 @@ struct Chown_option void chopt_init (struct Chown_option *); -void chopt_free (struct Chown_option *); +/* Deliberately do not free chopt->user_name or ->group_name. + They're not always allocated. */ +# define chopt_free(chopt) -char *gid_to_name (gid_t) _GL_ATTRIBUTE_MALLOC; +char * +gid_to_name (gid_t) _GL_ATTRIBUTE_MALLOC; -char *uid_to_name (uid_t) _GL_ATTRIBUTE_MALLOC; +char * +uid_to_name (uid_t) _GL_ATTRIBUTE_MALLOC; bool chown_files (char **files, int bit_flags, -- 2.47.2