From: Pádraig Brady Date: Fri, 4 May 2018 01:56:30 +0000 (-0700) Subject: build: make GCC 8 adjustments more portable X-Git-Tag: v8.30~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea7ae28b10edc146f415eab05dd55326cfd69032;p=thirdparty%2Fcoreutils.git 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. --- 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,