From 169ab5dec0e562548959482e3ff63c96c340e0d1 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Tue, 22 Dec 2009 15:14:49 -0700 Subject: [PATCH] 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 --- ChangeLog | 38 +++++++++++++++++++++++++++++++ lib/chown.c | 4 ++-- lib/fchmodat.c | 2 +- lib/fts.c | 6 ++--- lib/getdate.y | 4 ++-- lib/getgroups.c | 2 +- lib/getopt.c | 4 ++-- lib/getugroups.c | 8 +++---- lib/mkdir.c | 2 +- lib/mkfifo.c | 2 +- lib/mkfifoat.c | 4 ++-- lib/mknod.c | 4 ++-- lib/mknodat.c | 4 ++-- lib/readlink.c | 4 ++-- lib/se-context.in.h | 22 +++++++++--------- lib/se-selinux.in.h | 54 ++++++++++++++++++++++----------------------- lib/sockets.c | 2 +- lib/symlink.c | 4 ++-- lib/symlinkat.c | 4 ++-- lib/unicodeio.c | 4 ++-- lib/unistr.h | 4 ++-- m4/gnulib-common.m4 | 13 ++++++----- tests/test-areadlink.c | 2 +- tests/test-areadlinkat.c | 2 +- tests/test-filenamecat.c | 2 +- tests/test-fseeko.c | 2 +- tests/test-ftello.c | 2 +- tests/test-getdate.c | 2 +- tests/test-getgroups.c | 2 +- tests/test-gethostname.c | 2 +- tests/test-quotearg.c | 2 +- tests/test-version-etc.c | 2 +- tests/test-xalloc-die.c | 2 +- tests/test-xfprintf-posix.c | 2 +- tests/test-xprintf-posix.c | 2 +- tests/test-xvasprintf.c | 2 +- 36 files changed, 132 insertions(+), 91 deletions(-) diff --git a/ChangeLog b/ChangeLog index 28f92b027..7e1dd7635 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,43 @@ 2009-12-23 Eric Blake + 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. diff --git a/lib/chown.c b/lib/chown.c index 66bb0c8fe..a19cd34ce 100644 --- 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; diff --git a/lib/fchmodat.c b/lib/fchmodat.c index 62a5d0566..fa1ec4731 100644 --- 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; diff --git a/lib/fts.c b/lib/fts.c index 9329ef6c6..8e6e72890 100644 --- a/lib/fts.c +++ b/lib/fts.c @@ -712,9 +712,9 @@ leaf_optimization_applies (int dir_fd) #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 @@ check_for_dir: */ /* 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) { diff --git a/lib/getdate.y b/lib/getdate.y index e61ffdfaf..57aee96fa 100644 --- a/lib/getdate.y +++ b/lib/getdate.y @@ -1145,8 +1145,8 @@ yylex (YYSTYPE *lvalp, parser_control *pc) /* 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; } diff --git a/lib/getgroups.c b/lib/getgroups.c index e2bb68eff..3e7eaad02 100644 --- 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; diff --git a/lib/getopt.c b/lib/getopt.c index 5e9a4a50e..f2a109f09 100644 --- a/lib/getopt.c +++ b/lib/getopt.c @@ -226,8 +226,8 @@ exchange (char **argv, struct _getopt_data *d) /* 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 diff --git a/lib/getugroups.c b/lib/getugroups.c index b17563e89..50e1f4dca 100644 --- 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; diff --git a/lib/mkdir.c b/lib/mkdir.c index e6dbc78e0..34cab6c9a 100644 --- 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 diff --git a/lib/mkfifo.c b/lib/mkfifo.c index 3c29e8f6b..5ea8c17d9 100644 --- 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; diff --git a/lib/mkfifoat.c b/lib/mkfifoat.c index 89002f2bf..bef176680 100644 --- 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; diff --git a/lib/mknod.c b/lib/mknod.c index 662f5f88e..0918be791 100644 --- 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; diff --git a/lib/mknodat.c b/lib/mknodat.c index b5126bf8b..a2eae72dd 100644 --- 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; diff --git a/lib/readlink.c b/lib/readlink.c index 0c6f09a1b..41c81f91c 100644 --- 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; diff --git a/lib/se-context.in.h b/lib/se-context.in.h index 2c36cc20a..d69e80977 100644 --- a/lib/se-context.in.h +++ b/lib/se-context.in.h @@ -4,23 +4,23 @@ # include 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 diff --git a/lib/se-selinux.in.h b/lib/se-selinux.in.h index 3d243aef6..228054d9a 100644 --- a/lib/se-selinux.in.h +++ b/lib/se-selinux.in.h @@ -18,55 +18,55 @@ typedef unsigned short security_class_t; # 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 diff --git a/lib/sockets.c b/lib/sockets.c index b49e58062..3be3279d7 100644 --- a/lib/sockets.c +++ b/lib/sockets.c @@ -74,7 +74,7 @@ static int initialized_sockets_version /* = 0 */; #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) diff --git a/lib/symlink.c b/lib/symlink.c index 1e6cbedc3..d005dbd76 100644 --- a/lib/symlink.c +++ b/lib/symlink.c @@ -47,8 +47,8 @@ rpl_symlink (char const *contents, char const *name) /* 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; diff --git a/lib/symlinkat.c b/lib/symlinkat.c index cb5251048..721d1c5aa 100644 --- a/lib/symlinkat.c +++ b/lib/symlinkat.c @@ -27,8 +27,8 @@ # include 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; diff --git a/lib/unicodeio.c b/lib/unicodeio.c index 79cfbacaa..177e75c57 100644 --- a/lib/unicodeio.c +++ b/lib/unicodeio.c @@ -174,7 +174,7 @@ fwrite_success_callback (const char *buf, size_t buflen, void *callback_arg) /* 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 @@ exit_failure_callback (unsigned int code, const char *msg, 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; diff --git a/lib/unistr.h b/lib/unistr.h index 35cd2dab4..96c5357f7 100644 --- a/lib/unistr.h +++ b/lib/unistr.h @@ -183,7 +183,7 @@ extern int 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 @@ extern int 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; diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index 75da53db0..63c6300a2 100644 --- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 @@ -23,14 +23,17 @@ AC_DEFUN([gl_COMMON_BODY], [ # 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 ]) ]) diff --git a/tests/test-areadlink.c b/tests/test-areadlink.c index aa297cedc..9a3692714 100644 --- 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); } diff --git a/tests/test-areadlinkat.c b/tests/test-areadlinkat.c index e567b3718..f5deb7073 100644 --- a/tests/test-areadlinkat.c +++ b/tests/test-areadlinkat.c @@ -49,7 +49,7 @@ static int dfd = AT_FDCWD; /* 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); } diff --git a/tests/test-filenamecat.c b/tests/test-filenamecat.c index d10bf5fdb..2d8fd69a2 100644 --- 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] = { diff --git a/tests/test-fseeko.c b/tests/test-fseeko.c index 037c7f5ec..bdf025f5b 100644 --- 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. */ diff --git a/tests/test-ftello.c b/tests/test-ftello.c index ab5c45655..dfe5be02f 100644 --- 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. */ diff --git a/tests/test-getdate.c b/tests/test-getdate.c index 40d80dfe0..2971f97e4 100644 --- a/tests/test-getdate.c +++ b/tests/test-getdate.c @@ -61,7 +61,7 @@ static const char* const day_table[] = }; int -main (int argc _UNUSED_PARAMETER_, char **argv) +main (int argc _GL_UNUSED, char **argv) { struct timespec result; struct timespec result2; diff --git a/tests/test-getgroups.c b/tests/test-getgroups.c index aed80f181..6d4a5140f 100644 --- 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; diff --git a/tests/test-gethostname.c b/tests/test-gethostname.c index 32723da19..af1293b88 100644 --- 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; diff --git a/tests/test-quotearg.c b/tests/test-quotearg.c index c9636a1cc..cb5a73b09 100644 --- a/tests/test-quotearg.c +++ b/tests/test-quotearg.c @@ -378,7 +378,7 @@ use_quotearg_colon (const char *str, size_t *len) } 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]); diff --git a/tests/test-version-etc.c b/tests/test-version-etc.c index 9ff97c45a..26940ab9b 100644 --- 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, diff --git a/tests/test-xalloc-die.c b/tests/test-xalloc-die.c index 8b190d062..14cdbe6b6 100644 --- 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 (); diff --git a/tests/test-xfprintf-posix.c b/tests/test-xfprintf-posix.c index 70fb93adb..b7adf76a4 100644 --- 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]); diff --git a/tests/test-xprintf-posix.c b/tests/test-xprintf-posix.c index baba0422e..501f04ad5 100644 --- 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]); diff --git a/tests/test-xvasprintf.c b/tests/test-xvasprintf.c index a18994e23..eb230dbb2 100644 --- a/tests/test-xvasprintf.c +++ b/tests/test-xvasprintf.c @@ -130,7 +130,7 @@ test_xasprintf () } int -main (int argc _UNUSED_PARAMETER_, char *argv[]) +main (int argc _GL_UNUSED, char *argv[]) { set_program_name (argv[0]); -- 2.11.0