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.
This commit is contained in:
Pádraig Brady 2018-05-03 18:56:30 -07:00
parent 3299901cde
commit ea7ae28b10
2 changed files with 7 additions and 10 deletions

View File

@ -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. */

View File

@ -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,