]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
build: make GCC 8 adjustments more portable
authorPádraig Brady <P@draigBrady.com>
Fri, 4 May 2018 01:56:30 +0000 (18:56 -0700)
committerPádraig Brady <P@draigBrady.com>
Fri, 4 May 2018 01:59:53 +0000 (18:59 -0700)
* 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
src/chown-core.h

index 818ee0ff15f9be5029d27721795dfebab9d18628..c235ef39165cb85f42b6aa31c7af561ed476562f 100644 (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.  */
index 346b1cea4ae4e27e0c7248c5128bd170139e581c..c410158a6f9e56bc327d10daee0c2a99a5acd3be 100644 (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,