changeset 12482:11bc92a9e2bc

gnulib-common: prefer _GL_UNUSED over _UNUSED_PARAMETER_ There are more contexts where __attribute__((__unused__)) is useful than just parameter lists. Also, naming the macro _GL_UNUSED fits with the recent addition of _GL_ARG_NONNULL. Preserve the name _UNUSED_PARAMETER_ for backwards-compatible use in external projects. * m4/gnulib-common.m4 (gl_COMMON): Create a more-appropriately named alias for __attribute__((__unused__)). * lib/chown.c: Update client. * lib/fchmodat.c: Likewise. * lib/fts.c: Likewise. * lib/getdate.y: Likewise. * lib/getgroups.c: Likewise. * lib/getopt.c: Likewise. * lib/getugroups.c: Likewise. * lib/mkdir.c: Likewise. * lib/mkfifo.c: Likewise. * lib/mkfifoat.c: Likewise. * lib/mknod.c: Likewise. * lib/mknodat.c: Likewise. * lib/readlink.c: Likewise. * lib/se-context.in.h: Likewise. * lib/se-selinux.in.h: Likewise. * lib/sockets.c: Likewise. * lib/symlink.c: Likewise. * lib/symlinkat.c: Likewise. * lib/unicodeio.c: Likewise. * lib/unistr.h: Likewise. * tests/test-areadlink.c: Likewise. * tests/test-areadlinkat.c: Likewise. * tests/test-filenamecat.c: Likewise. * tests/test-fseeko.c: Likewise. * tests/test-ftello.c: Likewise. * tests/test-getdate.c: Likewise. * tests/test-getgroups.c: Likewise. * tests/test-gethostname.c: Likewise. * tests/test-quotearg.c: Likewise. * tests/test-version-etc.c: Likewise. * tests/test-xalloc-die.c: Likewise. * tests/test-xfprintf-posix.c: Likewise. * tests/test-xprintf-posix.c: Likewise. * tests/test-xvasprintf.c: Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
author Eric Blake <ebb9@byu.net>
date Tue, 22 Dec 2009 15:14:49 -0700
parents f5dcba492f50
children b1b3a310e65a
files ChangeLog lib/chown.c lib/fchmodat.c lib/fts.c lib/getdate.y lib/getgroups.c lib/getopt.c lib/getugroups.c lib/mkdir.c lib/mkfifo.c lib/mkfifoat.c lib/mknod.c lib/mknodat.c lib/readlink.c lib/se-context.in.h lib/se-selinux.in.h lib/sockets.c lib/symlink.c lib/symlinkat.c lib/unicodeio.c lib/unistr.h m4/gnulib-common.m4 tests/test-areadlink.c tests/test-areadlinkat.c tests/test-filenamecat.c tests/test-fseeko.c tests/test-ftello.c tests/test-getdate.c tests/test-getgroups.c tests/test-gethostname.c tests/test-quotearg.c tests/test-version-etc.c tests/test-xalloc-die.c tests/test-xfprintf-posix.c tests/test-xprintf-posix.c tests/test-xvasprintf.c
diffstat 36 files changed, 132 insertions(+), 91 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,43 @@
 2009-12-23  Eric Blake  <ebb9@byu.net>
 
+	gnulib-common: prefer _GL_UNUSED over _UNUSED_PARAMETER_
+	* m4/gnulib-common.m4 (gl_COMMON): Create a more-appropriately
+	named alias for __attribute__((__unused__)).
+	* lib/chown.c: Update client.
+	* lib/fchmodat.c: Likewise.
+	* lib/fts.c: Likewise.
+	* lib/getdate.y: Likewise.
+	* lib/getgroups.c: Likewise.
+	* lib/getopt.c: Likewise.
+	* lib/getugroups.c: Likewise.
+	* lib/mkdir.c: Likewise.
+	* lib/mkfifo.c: Likewise.
+	* lib/mkfifoat.c: Likewise.
+	* lib/mknod.c: Likewise.
+	* lib/mknodat.c: Likewise.
+	* lib/readlink.c: Likewise.
+	* lib/se-context.in.h: Likewise.
+	* lib/se-selinux.in.h: Likewise.
+	* lib/sockets.c: Likewise.
+	* lib/symlink.c: Likewise.
+	* lib/symlinkat.c: Likewise.
+	* lib/unicodeio.c: Likewise.
+	* lib/unistr.h: Likewise.
+	* tests/test-areadlink.c: Likewise.
+	* tests/test-areadlinkat.c: Likewise.
+	* tests/test-filenamecat.c: Likewise.
+	* tests/test-fseeko.c: Likewise.
+	* tests/test-ftello.c: Likewise.
+	* tests/test-getdate.c: Likewise.
+	* tests/test-getgroups.c: Likewise.
+	* tests/test-gethostname.c: Likewise.
+	* tests/test-quotearg.c: Likewise.
+	* tests/test-version-etc.c: Likewise.
+	* tests/test-xalloc-die.c: Likewise.
+	* tests/test-xfprintf-posix.c: Likewise.
+	* tests/test-xprintf-posix.c: Likewise.
+	* tests/test-xvasprintf.c: Likewise.
+
 	tests: avoid compiler warnings
 	* tests/test-fcntl.c (main): Delete unused parameters.
 	* tests/test-freopen-safer.c (main): Likewise.
--- a/lib/chown.c
+++ b/lib/chown.c
@@ -33,8 +33,8 @@
 
 /* Simple stub that always fails with ENOSYS, for mingw.  */
 int
-chown (const char *file _UNUSED_PARAMETER_, uid_t uid _UNUSED_PARAMETER_,
-       gid_t gid _UNUSED_PARAMETER_)
+chown (const char *file _GL_UNUSED, uid_t uid _GL_UNUSED,
+       gid_t gid _GL_UNUSED)
 {
   errno = ENOSYS;
   return -1;
--- a/lib/fchmodat.c
+++ b/lib/fchmodat.c
@@ -28,7 +28,7 @@
 # undef lchmod
 # define lchmod lchmod_rpl
 static int
-lchmod (char const *f _UNUSED_PARAMETER_, mode_t m _UNUSED_PARAMETER_)
+lchmod (char const *f _GL_UNUSED, mode_t m _GL_UNUSED)
 {
   errno = ENOSYS;
   return -1;
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -712,9 +712,9 @@
 
 #else
 static bool
-dirent_inode_sort_may_be_useful (int dir_fd _UNUSED_PARAMETER_) { return true; }
+dirent_inode_sort_may_be_useful (int dir_fd _GL_UNUSED) { return true; }
 static bool
-leaf_optimization_applies (int dir_fd _UNUSED_PARAMETER_) { return false; }
+leaf_optimization_applies (int dir_fd _GL_UNUSED) { return false; }
 #endif
 
 #if GNULIB_FTS
@@ -1064,7 +1064,7 @@
  */
 /* ARGSUSED */
 int
-fts_set(FTS *sp _UNUSED_PARAMETER_, FTSENT *p, int instr)
+fts_set(FTS *sp _GL_UNUSED, FTSENT *p, int instr)
 {
         if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW &&
             instr != FTS_NOINSTR && instr != FTS_SKIP) {
--- a/lib/getdate.y
+++ b/lib/getdate.y
@@ -1145,8 +1145,8 @@
 
 /* Do nothing if the parser reports an error.  */
 static int
-yyerror (parser_control const *pc _UNUSED_PARAMETER_,
-         char const *s _UNUSED_PARAMETER_)
+yyerror (parser_control const *pc _GL_UNUSED,
+         char const *s _GL_UNUSED)
 {
   return 0;
 }
--- a/lib/getgroups.c
+++ b/lib/getgroups.c
@@ -31,7 +31,7 @@
 /* Provide a stub that fails with ENOSYS, since there is no group
    information available on mingw.  */
 int
-getgroups (int n _UNUSED_PARAMETER_, GETGROUPS_T *groups _UNUSED_PARAMETER_)
+getgroups (int n _GL_UNUSED, GETGROUPS_T *groups _GL_UNUSED)
 {
   errno = ENOSYS;
   return -1;
--- a/lib/getopt.c
+++ b/lib/getopt.c
@@ -226,8 +226,8 @@
 /* Initialize the internal data when the first call is made.  */
 
 static const char *
-_getopt_initialize (int argc _UNUSED_PARAMETER_,
-                    char **argv _UNUSED_PARAMETER_, const char *optstring,
+_getopt_initialize (int argc _GL_UNUSED,
+                    char **argv _GL_UNUSED, const char *optstring,
                     struct _getopt_data *d, int posixly_correct)
 {
   /* Start processing options with ARGV-element 1 (since ARGV-element 0
--- a/lib/getugroups.c
+++ b/lib/getugroups.c
@@ -33,10 +33,10 @@
    can do is fail with ENOSYS.  */
 
 int
-getugroups (int maxcount _UNUSED_PARAMETER_,
-            gid_t *grouplist _UNUSED_PARAMETER_,
-            char const *username _UNUSED_PARAMETER_,
-            gid_t gid _UNUSED_PARAMETER_)
+getugroups (int maxcount _GL_UNUSED,
+            gid_t *grouplist _GL_UNUSED,
+            char const *username _GL_UNUSED,
+            gid_t gid _GL_UNUSED)
 {
   errno = ENOSYS;
   return -1;
--- a/lib/mkdir.c
+++ b/lib/mkdir.c
@@ -40,7 +40,7 @@
    alias mkdir), only in the nonstandard io.h.  */
 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
 # define mkdir(name,mode) _mkdir (name)
-# define maybe_unused _UNUSED_PARAMETER_
+# define maybe_unused _GL_UNUSED
 #else
 # define maybe_unused /* empty */
 #endif
--- a/lib/mkfifo.c
+++ b/lib/mkfifo.c
@@ -27,7 +27,7 @@
 /* Mingw lacks mkfifo; always fail with ENOSYS.  */
 
 int
-mkfifo (char const *name _UNUSED_PARAMETER_, mode_t mode _UNUSED_PARAMETER_)
+mkfifo (char const *name _GL_UNUSED, mode_t mode _GL_UNUSED)
 {
   errno = ENOSYS;
   return -1;
--- a/lib/mkfifoat.c
+++ b/lib/mkfifoat.c
@@ -27,8 +27,8 @@
 /* Mingw lacks mkfifo, so this wrapper is trivial.  */
 
 int
-mkfifoat (int fd _UNUSED_PARAMETER_, char const *path _UNUSED_PARAMETER_,
-          mode_t mode _UNUSED_PARAMETER_)
+mkfifoat (int fd _GL_UNUSED, char const *path _GL_UNUSED,
+          mode_t mode _GL_UNUSED)
 {
   errno = ENOSYS;
   return -1;
--- a/lib/mknod.c
+++ b/lib/mknod.c
@@ -27,8 +27,8 @@
 /* Mingw lacks mknod; always fail with ENOSYS.  */
 
 int
-mknod (char const *name _UNUSED_PARAMETER_, mode_t mode _UNUSED_PARAMETER_,
-       dev_t dev _UNUSED_PARAMETER_)
+mknod (char const *name _GL_UNUSED, mode_t mode _GL_UNUSED,
+       dev_t dev _GL_UNUSED)
 {
   errno = ENOSYS;
   return -1;
--- a/lib/mknodat.c
+++ b/lib/mknodat.c
@@ -27,8 +27,8 @@
 /* Mingw lacks mknod, so this wrapper is trivial.  */
 
 int
-mknodat (int fd _UNUSED_PARAMETER_, char const *path _UNUSED_PARAMETER_,
-         mode_t mode _UNUSED_PARAMETER_, dev_t dev _UNUSED_PARAMETER_)
+mknodat (int fd _GL_UNUSED, char const *path _GL_UNUSED,
+         mode_t mode _GL_UNUSED, dev_t dev _GL_UNUSED)
 {
   errno = ENOSYS;
   return -1;
--- a/lib/readlink.c
+++ b/lib/readlink.c
@@ -29,8 +29,8 @@
    such as DJGPP 2.03 and mingw32.  */
 
 ssize_t
-readlink (const char *name, char *buf _UNUSED_PARAMETER_,
-          size_t bufsize _UNUSED_PARAMETER_)
+readlink (const char *name, char *buf _GL_UNUSED,
+          size_t bufsize _GL_UNUSED)
 {
   struct stat statbuf;
 
--- a/lib/se-context.in.h
+++ b/lib/se-context.in.h
@@ -4,23 +4,23 @@
 # include <errno.h>
 
 typedef int context_t;
-static inline context_t context_new (char const *s _UNUSED_PARAMETER_)
+static inline context_t context_new (char const *s _GL_UNUSED)
   { errno = ENOTSUP; return 0; }
-static inline char *context_str (context_t con _UNUSED_PARAMETER_)
+static inline char *context_str (context_t con _GL_UNUSED)
   { errno = ENOTSUP; return (void *) 0; }
-static inline void context_free (context_t c _UNUSED_PARAMETER_) {}
+static inline void context_free (context_t c _GL_UNUSED) {}
 
-static inline int context_user_set (context_t sc _UNUSED_PARAMETER_,
-                                    char const *s _UNUSED_PARAMETER_)
+static inline int context_user_set (context_t sc _GL_UNUSED,
+                                    char const *s _GL_UNUSED)
   { errno = ENOTSUP; return -1; }
-static inline int context_role_set (context_t sc _UNUSED_PARAMETER_,
-                                    char const *s _UNUSED_PARAMETER_)
+static inline int context_role_set (context_t sc _GL_UNUSED,
+                                    char const *s _GL_UNUSED)
   { errno = ENOTSUP; return -1; }
-static inline int context_range_set (context_t sc _UNUSED_PARAMETER_,
-                                     char const *s _UNUSED_PARAMETER_)
+static inline int context_range_set (context_t sc _GL_UNUSED,
+                                     char const *s _GL_UNUSED)
   { errno = ENOTSUP; return -1; }
-static inline int context_type_set (context_t sc _UNUSED_PARAMETER_,
-                                    char const *s _UNUSED_PARAMETER_)
+static inline int context_type_set (context_t sc _GL_UNUSED,
+                                    char const *s _GL_UNUSED)
   { errno = ENOTSUP; return -1; }
 
 #endif
--- a/lib/se-selinux.in.h
+++ b/lib/se-selinux.in.h
@@ -18,55 +18,55 @@
 #  define security_context_t char*
 #  define is_selinux_enabled() 0
 
-static inline int getcon (security_context_t *con _UNUSED_PARAMETER_)
+static inline int getcon (security_context_t *con _GL_UNUSED)
   { errno = ENOTSUP; return -1; }
-static inline void freecon (security_context_t con _UNUSED_PARAMETER_) {}
+static inline void freecon (security_context_t con _GL_UNUSED) {}
 
 
-static inline int getfscreatecon (security_context_t *con _UNUSED_PARAMETER_)
+static inline int getfscreatecon (security_context_t *con _GL_UNUSED)
   { errno = ENOTSUP; return -1; }
-static inline int setfscreatecon (security_context_t con _UNUSED_PARAMETER_)
+static inline int setfscreatecon (security_context_t con _GL_UNUSED)
   { errno = ENOTSUP; return -1; }
-static inline int matchpathcon (char const *file _UNUSED_PARAMETER_,
-                                mode_t m _UNUSED_PARAMETER_,
-                                security_context_t *con _UNUSED_PARAMETER_)
+static inline int matchpathcon (char const *file _GL_UNUSED,
+                                mode_t m _GL_UNUSED,
+                                security_context_t *con _GL_UNUSED)
   { errno = ENOTSUP; return -1; }
-static inline int getfilecon (char const *file _UNUSED_PARAMETER_,
-                              security_context_t *con _UNUSED_PARAMETER_)
+static inline int getfilecon (char const *file _GL_UNUSED,
+                              security_context_t *con _GL_UNUSED)
   { errno = ENOTSUP; return -1; }
-static inline int lgetfilecon (char const *file _UNUSED_PARAMETER_,
-                               security_context_t *con _UNUSED_PARAMETER_)
+static inline int lgetfilecon (char const *file _GL_UNUSED,
+                               security_context_t *con _GL_UNUSED)
   { errno = ENOTSUP; return -1; }
 static inline int fgetfilecon (int fd,
-                               security_context_t *con _UNUSED_PARAMETER_)
+                               security_context_t *con _GL_UNUSED)
   { errno = ENOTSUP; return -1; }
-static inline int setfilecon (char const *file _UNUSED_PARAMETER_,
-                              security_context_t con _UNUSED_PARAMETER_)
+static inline int setfilecon (char const *file _GL_UNUSED,
+                              security_context_t con _GL_UNUSED)
   { errno = ENOTSUP; return -1; }
-static inline int lsetfilecon (char const *file _UNUSED_PARAMETER_,
-                               security_context_t con _UNUSED_PARAMETER_)
+static inline int lsetfilecon (char const *file _GL_UNUSED,
+                               security_context_t con _GL_UNUSED)
   { errno = ENOTSUP; return -1; }
-static inline int fsetfilecon (int fd _UNUSED_PARAMETER_,
-                               security_context_t con _UNUSED_PARAMETER_)
+static inline int fsetfilecon (int fd _GL_UNUSED,
+                               security_context_t con _GL_UNUSED)
   { errno = ENOTSUP; return -1; }
 
 static inline int security_check_context
-    (security_context_t con _UNUSED_PARAMETER_)
+    (security_context_t con _GL_UNUSED)
   { errno = ENOTSUP; return -1; }
 static inline int security_check_context_raw
-    (security_context_t con _UNUSED_PARAMETER_)
+    (security_context_t con _GL_UNUSED)
   { errno = ENOTSUP; return -1; }
-static inline int setexeccon (security_context_t con _UNUSED_PARAMETER_)
+static inline int setexeccon (security_context_t con _GL_UNUSED)
   { errno = ENOTSUP; return -1; }
 static inline int security_compute_create
-    (security_context_t scon _UNUSED_PARAMETER_,
-     security_context_t tcon _UNUSED_PARAMETER_,
-     security_class_t tclass _UNUSED_PARAMETER_,
-     security_context_t *newcon _UNUSED_PARAMETER_)
+    (security_context_t scon _GL_UNUSED,
+     security_context_t tcon _GL_UNUSED,
+     security_class_t tclass _GL_UNUSED,
+     security_context_t *newcon _GL_UNUSED)
   { errno = ENOTSUP; return -1; }
 static inline int matchpathcon_init_prefix
-    (char const *path _UNUSED_PARAMETER_,
-     char const *prefix _UNUSED_PARAMETER_)
+    (char const *path _GL_UNUSED,
+     char const *prefix _GL_UNUSED)
   { errno = ENOTSUP; return -1; }
 
 # endif
--- a/lib/sockets.c
+++ b/lib/sockets.c
@@ -74,7 +74,7 @@
 #endif /* WINDOWS_SOCKETS */
 
 int
-gl_sockets_startup (int version _UNUSED_PARAMETER_)
+gl_sockets_startup (int version _GL_UNUSED)
 {
 #if WINDOWS_SOCKETS
   if (version > initialized_sockets_version)
--- a/lib/symlink.c
+++ b/lib/symlink.c
@@ -47,8 +47,8 @@
 
 /* The system does not support symlinks.  */
 int
-symlink (char const *contents _UNUSED_PARAMETER_,
-         char const *name _UNUSED_PARAMETER_)
+symlink (char const *contents _GL_UNUSED,
+         char const *name _GL_UNUSED)
 {
   errno = ENOSYS;
   return -1;
--- a/lib/symlinkat.c
+++ b/lib/symlinkat.c
@@ -27,8 +27,8 @@
 # include <errno.h>
 
 int
-symlinkat (char const *path1 _UNUSED_PARAMETER_, int fd _UNUSED_PARAMETER_,
-           char const *path2 _UNUSED_PARAMETER_)
+symlinkat (char const *path1 _GL_UNUSED, int fd _GL_UNUSED,
+           char const *path2 _GL_UNUSED)
 {
   errno = ENOSYS;
   return -1;
--- a/lib/unicodeio.c
+++ b/lib/unicodeio.c
@@ -174,7 +174,7 @@
 /* Simple failure callback that displays an error and exits.  */
 static long
 exit_failure_callback (unsigned int code, const char *msg,
-                       void *callback_arg _UNUSED_PARAMETER_)
+                       void *callback_arg _GL_UNUSED)
 {
   if (msg == NULL)
     error (1, 0, _("cannot convert U+%04X to local character set"), code);
@@ -188,7 +188,7 @@
    ASCII, using the same notation as ISO C99 strings.  */
 static long
 fallback_failure_callback (unsigned int code,
-                           const char *msg _UNUSED_PARAMETER_,
+                           const char *msg _GL_UNUSED,
                            void *callback_arg)
 {
   FILE *stream = (FILE *) callback_arg;
--- a/lib/unistr.h
+++ b/lib/unistr.h
@@ -183,7 +183,7 @@
        u32_mbtouc_unsafe (ucs4_t *puc, const uint32_t *s, size_t n);
 # else
 static inline int
-u32_mbtouc_unsafe (ucs4_t *puc, const uint32_t *s, size_t n _UNUSED_PARAMETER_)
+u32_mbtouc_unsafe (ucs4_t *puc, const uint32_t *s, size_t n _GL_UNUSED)
 {
   uint32_t c = *s;
 
@@ -253,7 +253,7 @@
        u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n);
 # else
 static inline int
-u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n _UNUSED_PARAMETER_)
+u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n _GL_UNUSED)
 {
   uint32_t c = *s;
 
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -23,14 +23,17 @@
 # define __GNUC_STDC_INLINE__ 1
 #endif])
   AH_VERBATIM([unused_parameter],
-[/* Define as a marker that can be attached to function parameter declarations
-   for parameters that are not used.  This helps to reduce warnings, such as
-   from GCC -Wunused-parameter.  */
+[/* Define as a marker that can be attached to declarations that might not
+    be used.  This helps to reduce warnings, such as from
+    GCC -Wunused-parameter.  */
 #if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-# define _UNUSED_PARAMETER_ __attribute__ ((__unused__))
+# define _GL_UNUSED __attribute__ ((__unused__))
 #else
-# define _UNUSED_PARAMETER_
+# define _GL_UNUSED
 #endif
+/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
+   is a misnomer outside of parameter lists.  */
+#define _UNUSED_PARAMETER_ _GL_UNUSED
 ])
 ])
 
--- a/tests/test-areadlink.c
+++ b/tests/test-areadlink.c
@@ -47,7 +47,7 @@
 
 /* Wrapper for testing areadlink.  */
 static char *
-do_areadlink (char const *name, size_t ignored _UNUSED_PARAMETER_)
+do_areadlink (char const *name, size_t ignored _GL_UNUSED)
 {
   return areadlink (name);
 }
--- a/tests/test-areadlinkat.c
+++ b/tests/test-areadlinkat.c
@@ -49,7 +49,7 @@
 
 /* Wrapper for testing areadlinkat.  */
 static char *
-do_areadlinkat (char const *name, size_t ignored _UNUSED_PARAMETER_)
+do_areadlinkat (char const *name, size_t ignored _GL_UNUSED)
 {
   return areadlinkat (dfd, name);
 }
--- a/tests/test-filenamecat.c
+++ b/tests/test-filenamecat.c
@@ -29,7 +29,7 @@
 #include "progname.h"
 
 int
-main (int argc _UNUSED_PARAMETER_, char *argv[])
+main (int argc _GL_UNUSED, char *argv[])
 {
   static char const *const tests[][3] =
     {
--- a/tests/test-fseeko.c
+++ b/tests/test-fseeko.c
@@ -45,7 +45,7 @@
 #endif
 
 int
-main (int argc, char **argv _UNUSED_PARAMETER_)
+main (int argc, char **argv _GL_UNUSED)
 {
   /* Assume stdin is non-empty, seekable, and starts with '#!/bin/sh'
      iff argc > 1.  */
--- a/tests/test-ftello.c
+++ b/tests/test-ftello.c
@@ -46,7 +46,7 @@
 #endif
 
 int
-main (int argc, char **argv _UNUSED_PARAMETER_)
+main (int argc, char **argv _GL_UNUSED)
 {
   int ch;
   /* Assume stdin is seekable iff argc > 1.  */
--- a/tests/test-getdate.c
+++ b/tests/test-getdate.c
@@ -61,7 +61,7 @@
 };
 
 int
-main (int argc _UNUSED_PARAMETER_, char **argv)
+main (int argc _GL_UNUSED, char **argv)
 {
   struct timespec result;
   struct timespec result2;
--- a/tests/test-getgroups.c
+++ b/tests/test-getgroups.c
@@ -38,7 +38,7 @@
   while (0)
 
 int
-main (int argc, char **argv _UNUSED_PARAMETER_)
+main (int argc, char **argv _GL_UNUSED)
 {
   int result;
   gid_t *groups;
--- a/tests/test-gethostname.c
+++ b/tests/test-gethostname.c
@@ -29,7 +29,7 @@
 #define NOHOSTNAME "magic-gnulib-test-string"
 
 int
-main (int argc, char *argv[] _UNUSED_PARAMETER_)
+main (int argc, char *argv[] _GL_UNUSED)
 {
   char buf[HOST_NAME_MAX];
   int rc;
--- a/tests/test-quotearg.c
+++ b/tests/test-quotearg.c
@@ -378,7 +378,7 @@
 }
 
 int
-main (int argc _UNUSED_PARAMETER_, char *argv[])
+main (int argc _GL_UNUSED, char *argv[])
 {
   int i;
   bool ascii_only = MB_CUR_MAX == 1 && !isprint ((unsigned char) LQ[0]);
--- a/tests/test-version-etc.c
+++ b/tests/test-version-etc.c
@@ -24,7 +24,7 @@
 #define AUTHORS "Sergey Poznyakoff", "Eric Blake"
 
 int
-main (int argc _UNUSED_PARAMETER_, char **argv)
+main (int argc _GL_UNUSED, char **argv)
 {
   set_program_name (argv[0]);
   version_etc (stdout, "test-version-etc", "dummy", "0", AUTHORS,
--- a/tests/test-xalloc-die.c
+++ b/tests/test-xalloc-die.c
@@ -22,7 +22,7 @@
 #include "progname.h"
 
 int
-main (int argc _UNUSED_PARAMETER_, char **argv)
+main (int argc _GL_UNUSED, char **argv)
 {
   set_program_name (argv[0]);
   xalloc_die ();
--- a/tests/test-xfprintf-posix.c
+++ b/tests/test-xfprintf-posix.c
@@ -44,7 +44,7 @@
 #include "test-fprintf-posix.h"
 
 int
-main (int argc _UNUSED_PARAMETER_, char *argv[])
+main (int argc _GL_UNUSED, char *argv[])
 {
   set_program_name (argv[0]);
 
--- a/tests/test-xprintf-posix.c
+++ b/tests/test-xprintf-posix.c
@@ -43,7 +43,7 @@
 #include "test-printf-posix.h"
 
 int
-main (int argc _UNUSED_PARAMETER_, char *argv[])
+main (int argc _GL_UNUSED, char *argv[])
 {
   set_program_name (argv[0]);
 
--- a/tests/test-xvasprintf.c
+++ b/tests/test-xvasprintf.c
@@ -130,7 +130,7 @@
 }
 
 int
-main (int argc _UNUSED_PARAMETER_, char *argv[])
+main (int argc _GL_UNUSED, char *argv[])
 {
   set_program_name (argv[0]);