gnulib-common.m4: Use C2x [[maybe_unused]] when possible.

* m4/gnulib-common.m4 (gl_COMMON_BODY): Define _GL_UNUSED as an alias of
_GL_ATTRIBUTE_MAYBE_UNUSED, not of _GL_ATTRIBUTE_UNUSED.
* lib/binary-io.h (__gl_setmode): Put _GL_UNUSED before, not after, the
declaration.
* lib/c-stack.c (null_action, segv_handler, overflow_handler,
c_stack_action): Likewise.
* lib/chown.c (chown): Likewise.
* lib/clean-temp-simple.c (cleanup_action): Likewise.
* lib/fts.c (dirent_inode_sort_may_be_useful, leaf_optimization,
fts_set): Likewise.
* lib/getgroups.c (getgroups): Likewise.
* lib/getopt.c (_getopt_initialize): Likewise.
* lib/getugroups.c (getugroups): Likewise.
* lib/localename.c (gl_locale_name_thread_unsafe, gl_locale_name_thread,
gl_locale_name_posix, gl_locale_name_environ): Likewise.
* lib/mkdir.c (rpl_mkdir): Likewise.
* lib/mkfifo.c (mkfifo): Likewise.
* lib/mkfifoat.c (mkfifoat): Likewise.
* lib/mknod.c (mknod): Likewise.
* lib/mknodat.c (mknodat): Likewise.
* lib/mountlist.c (me_remote): Likewise.
* lib/openpty.c (openpty): Likewise.
* lib/parse-datetime.y (yyerror): Likewise.
* lib/passfd.c (sendfd, recvfd): Likewise.
* lib/pthread-cond.c (pthread_condattr_destroy, pthread_cond_init,
pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
pthread_cond_broadcast, pthread_cond_destroy): Likewise.
* lib/pthread-mutex.c (pthread_mutexattr_destroy, pthread_mutex_init,
pthread_mutex_lock, pthread_mutex_trylock, pthread_mutex_timedlock,
pthread_mutex_unlock, pthread_mutex_destroy): Likewise.
* lib/pthread-rwlock.c (pthread_rwlockattr_destroy, pthread_rwlock_init,
pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock): Likewise.
* lib/pthread-spin.c (pthread_spin_init, pthread_spin_lock,
pthread_spin_trylock, pthread_spin_unlock, pthread_spin_destroy):
Likewise.
* lib/pthread-thread.c (pthread_attr_destroy): Likewise.
* lib/readlink.c (readlink): Likewise.
* lib/rename.c (rpl_rename): Likewise.
* lib/set-permissions.c (set_permissions): Likewise.
* lib/sockets.c (gl_sockets_startup): Likewise.
* lib/stat-time.h (get_stat_birthtime_ns, get_stat_birthtime,
stat_time_normalize): Likewise.
* lib/strptime.c (__strptime_internal): Likewise.
* lib/strtod.c (LDEXP): Likewise.
* lib/symlink.c (symlink): Likewise.
* lib/symlinkat.c (symlinkat): Likewise.
* lib/tempname.c (try_dir, try_nocreate): Likewise.
* lib/textstyle.in.h (styled_ostream_begin_use_class,
styled_ostream_end_use_class, styled_ostream_get_hyperlink_ref,
styled_ostream_get_hyperlink_id, styled_ostream_set_hyperlink,
styled_ostream_flush_to_current_style, fd_ostream_create,
term_ostream_get_color, term_ostream_set_color,
term_ostream_get_bgcolor, term_ostream_set_bgcolor,
term_ostream_get_weight, term_ostream_set_weight,
term_ostream_get_posture, term_ostream_set_posture,
term_ostream_get_underline, term_ostream_set_underline,
term_ostream_get_hyperlink_ref, term_ostream_get_hyperlink_id,
term_ostream_set_hyperlink, term_ostream_create,
term_styled_ostream_create, html_styled_ostream_create,
handle_color_option, handle_style_option, style_file_prepare,
styled_ostream_create, libtextstyle_set_failure_exit_code): Likewise.
* lib/unicodeio.c (exit_failure_callback, fallback_failure_callback):
Likewise.
* lib/wait-process.c (cleanup_slaves_action): Likewise.
* tests/signature.h (SIGNATURE_CHECK2): Likewise.
* tests/test-areadlink.c (do_areadlink): Likewise.
* tests/test-areadlinkat.c (do_areadlinkat): Likewise.
* tests/test-ceilf-ieee.c (main): Likewise.
* tests/test-ceilf1.c (main): Likewise.
* tests/test-dirent.c (dir): Likewise.
* tests/test-fchownat.c (main): Likewise.
* tests/test-fdopendir.c (main): Likewise.
* tests/test-filenamecat.c (main): Likewise.
* tests/test-floor1.c (main): Likewise.
* tests/test-floorf-ieee.c (main): Likewise.
* tests/test-floorf1.c (main): Likewise.
* tests/test-fseeko.c (main): Likewise.
* tests/test-fstatat.c (main): Likewise.
* tests/test-ftello.c (main): Likewise.
* tests/test-getdomainname.c (main): Likewise.
* tests/test-getgroups.c (main): Likewise.
* tests/test-gethostname.c (main): Likewise.
* tests/test-math-c++.cc (OVERLOADED_CHECK): Likewise.
* tests/test-mkdirat.c (main): Likewise.
* tests/test-openat.c (main): Likewise.
* tests/test-parse-datetime.c (main): Likewise.
* tests/test-quotearg-simple.c (main): Likewise.
* tests/test-quotearg.c (main): Likewise.
* tests/test-sethostname2.c (main): Likewise.
* tests/test-unlinkat.c (main): Likewise.
* tests/test-version-etc.c (main): Likewise.
* tests/test-xalloc-die.c (main): Likewise.
* tests/test-xfprintf-posix.c (main): Likewise.
* tests/test-xprintf-posix.c (main): Likewise.
* tests/test-xvasprintf.c (main): Likewise.
This commit is contained in:
Bruno Haible
2021-08-22 22:04:34 +02:00
parent 55974fb629
commit b034c7933b
71 changed files with 326 additions and 176 deletions
+99
View File
@@ -1,3 +1,102 @@
2021-08-22 Bruno Haible <bruno@clisp.org>
gnulib-common.m4: Use C2x [[maybe_unused]] when possible.
* m4/gnulib-common.m4 (gl_COMMON_BODY): Define _GL_UNUSED as an alias of
_GL_ATTRIBUTE_MAYBE_UNUSED, not of _GL_ATTRIBUTE_UNUSED.
* lib/binary-io.h (__gl_setmode): Put _GL_UNUSED before, not after, the
declaration.
* lib/c-stack.c (null_action, segv_handler, overflow_handler,
c_stack_action): Likewise.
* lib/chown.c (chown): Likewise.
* lib/clean-temp-simple.c (cleanup_action): Likewise.
* lib/fts.c (dirent_inode_sort_may_be_useful, leaf_optimization,
fts_set): Likewise.
* lib/getgroups.c (getgroups): Likewise.
* lib/getopt.c (_getopt_initialize): Likewise.
* lib/getugroups.c (getugroups): Likewise.
* lib/localename.c (gl_locale_name_thread_unsafe, gl_locale_name_thread,
gl_locale_name_posix, gl_locale_name_environ): Likewise.
* lib/mkdir.c (rpl_mkdir): Likewise.
* lib/mkfifo.c (mkfifo): Likewise.
* lib/mkfifoat.c (mkfifoat): Likewise.
* lib/mknod.c (mknod): Likewise.
* lib/mknodat.c (mknodat): Likewise.
* lib/mountlist.c (me_remote): Likewise.
* lib/openpty.c (openpty): Likewise.
* lib/parse-datetime.y (yyerror): Likewise.
* lib/passfd.c (sendfd, recvfd): Likewise.
* lib/pthread-cond.c (pthread_condattr_destroy, pthread_cond_init,
pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
pthread_cond_broadcast, pthread_cond_destroy): Likewise.
* lib/pthread-mutex.c (pthread_mutexattr_destroy, pthread_mutex_init,
pthread_mutex_lock, pthread_mutex_trylock, pthread_mutex_timedlock,
pthread_mutex_unlock, pthread_mutex_destroy): Likewise.
* lib/pthread-rwlock.c (pthread_rwlockattr_destroy, pthread_rwlock_init,
pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock): Likewise.
* lib/pthread-spin.c (pthread_spin_init, pthread_spin_lock,
pthread_spin_trylock, pthread_spin_unlock, pthread_spin_destroy):
Likewise.
* lib/pthread-thread.c (pthread_attr_destroy): Likewise.
* lib/readlink.c (readlink): Likewise.
* lib/rename.c (rpl_rename): Likewise.
* lib/set-permissions.c (set_permissions): Likewise.
* lib/sockets.c (gl_sockets_startup): Likewise.
* lib/stat-time.h (get_stat_birthtime_ns, get_stat_birthtime,
stat_time_normalize): Likewise.
* lib/strptime.c (__strptime_internal): Likewise.
* lib/strtod.c (LDEXP): Likewise.
* lib/symlink.c (symlink): Likewise.
* lib/symlinkat.c (symlinkat): Likewise.
* lib/tempname.c (try_dir, try_nocreate): Likewise.
* lib/textstyle.in.h (styled_ostream_begin_use_class,
styled_ostream_end_use_class, styled_ostream_get_hyperlink_ref,
styled_ostream_get_hyperlink_id, styled_ostream_set_hyperlink,
styled_ostream_flush_to_current_style, fd_ostream_create,
term_ostream_get_color, term_ostream_set_color,
term_ostream_get_bgcolor, term_ostream_set_bgcolor,
term_ostream_get_weight, term_ostream_set_weight,
term_ostream_get_posture, term_ostream_set_posture,
term_ostream_get_underline, term_ostream_set_underline,
term_ostream_get_hyperlink_ref, term_ostream_get_hyperlink_id,
term_ostream_set_hyperlink, term_ostream_create,
term_styled_ostream_create, html_styled_ostream_create,
handle_color_option, handle_style_option, style_file_prepare,
styled_ostream_create, libtextstyle_set_failure_exit_code): Likewise.
* lib/unicodeio.c (exit_failure_callback, fallback_failure_callback):
Likewise.
* lib/wait-process.c (cleanup_slaves_action): Likewise.
* tests/signature.h (SIGNATURE_CHECK2): Likewise.
* tests/test-areadlink.c (do_areadlink): Likewise.
* tests/test-areadlinkat.c (do_areadlinkat): Likewise.
* tests/test-ceilf-ieee.c (main): Likewise.
* tests/test-ceilf1.c (main): Likewise.
* tests/test-dirent.c (dir): Likewise.
* tests/test-fchownat.c (main): Likewise.
* tests/test-fdopendir.c (main): Likewise.
* tests/test-filenamecat.c (main): Likewise.
* tests/test-floor1.c (main): Likewise.
* tests/test-floorf-ieee.c (main): Likewise.
* tests/test-floorf1.c (main): Likewise.
* tests/test-fseeko.c (main): Likewise.
* tests/test-fstatat.c (main): Likewise.
* tests/test-ftello.c (main): Likewise.
* tests/test-getdomainname.c (main): Likewise.
* tests/test-getgroups.c (main): Likewise.
* tests/test-gethostname.c (main): Likewise.
* tests/test-math-c++.cc (OVERLOADED_CHECK): Likewise.
* tests/test-mkdirat.c (main): Likewise.
* tests/test-openat.c (main): Likewise.
* tests/test-parse-datetime.c (main): Likewise.
* tests/test-quotearg-simple.c (main): Likewise.
* tests/test-quotearg.c (main): Likewise.
* tests/test-sethostname2.c (main): Likewise.
* tests/test-unlinkat.c (main): Likewise.
* tests/test-version-etc.c (main): Likewise.
* tests/test-xalloc-die.c (main): Likewise.
* tests/test-xfprintf-posix.c (main): Likewise.
* tests/test-xprintf-posix.c (main): Likewise.
* tests/test-xvasprintf.c (main): Likewise.
2021-08-22 Bruno Haible <bruno@clisp.org>
gnulib-common.m4: Document the gnulib-internal _GL_ATTRIBUTE_* macros.
+1 -1
View File
@@ -47,7 +47,7 @@ _GL_INLINE_HEADER_BEGIN
/* Use a function rather than a macro, to avoid gcc warnings
"warning: statement with no effect". */
BINARY_IO_INLINE int
__gl_setmode (int fd _GL_UNUSED, int mode _GL_UNUSED)
__gl_setmode (_GL_UNUSED int fd, _GL_UNUSED int mode)
{
return O_BINARY;
}
+4 -4
View File
@@ -126,7 +126,7 @@ die (int signo)
}
static _GL_ASYNC_SAFE void
null_action (int signo _GL_UNUSED)
null_action (_GL_UNUSED int signo)
{
}
@@ -142,7 +142,7 @@ static volatile int segv_handler_missing;
overflow. This function is async-signal-safe. */
static _GL_ASYNC_SAFE int
segv_handler (void *address _GL_UNUSED, int serious)
segv_handler (_GL_UNUSED void *address, int serious)
{
# if DEBUG
{
@@ -165,7 +165,7 @@ segv_handler (void *address _GL_UNUSED, int serious)
overflow and exit. This function is async-signal-safe. */
static _GL_ASYNC_SAFE _Noreturn void
overflow_handler (int emergency, stackoverflow_context_t context _GL_UNUSED)
overflow_handler (int emergency, _GL_UNUSED stackoverflow_context_t context)
{
# if DEBUG
{
@@ -205,7 +205,7 @@ c_stack_action (_GL_ASYNC_SAFE void (*action) (int))
#else /* !HAVE_STACK_OVERFLOW_RECOVERY */
int
c_stack_action (_GL_ASYNC_SAFE void (*action) (int) _GL_UNUSED)
c_stack_action (_GL_ASYNC_SAFE void (*action) (_GL_UNUSED int) )
{
errno = ENOTSUP;
return -1;
+2 -2
View File
@@ -33,8 +33,8 @@
/* Simple stub that always fails with ENOSYS, for mingw. */
int
chown (const char *file _GL_UNUSED, uid_t uid _GL_UNUSED,
gid_t gid _GL_UNUSED)
chown (_GL_UNUSED const char *file, _GL_UNUSED uid_t uid,
_GL_UNUSED gid_t gid)
{
errno = ENOSYS;
return -1;
+1 -1
View File
@@ -184,7 +184,7 @@ clean_temp_init_asyncsafe_close (void)
/* The signal handler. It gets called asynchronously. */
static _GL_ASYNC_SAFE void
cleanup_action (int sig _GL_UNUSED)
cleanup_action (_GL_UNUSED int sig)
{
size_t i;
+11
View File
@@ -0,0 +1,11 @@
int foo (int x)
{
x += 2;
if (x & 1)
goto a;
b:
__attribute__ ((__maybe_unused__));
x *= 3;
a:
return x;
}
+40
View File
@@ -0,0 +1,40 @@
.text
.file "foo.c"
.globl _Z3fooi # -- Begin function _Z3fooi
.p2align 4, 0x90
.type _Z3fooi,@function
_Z3fooi: # @_Z3fooi
.cfi_startproc
# %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movl %edi, -4(%rbp)
movl -4(%rbp), %eax
addl $2, %eax
movl %eax, -4(%rbp)
movl -4(%rbp), %eax
andl $1, %eax
cmpl $0, %eax
je .LBB0_2
# %bb.1:
jmp .LBB0_4
.LBB0_2:
jmp .LBB0_3
.LBB0_3:
imull $3, -4(%rbp), %eax
movl %eax, -4(%rbp)
.LBB0_4:
movl -4(%rbp), %eax
popq %rbp
.cfi_def_cfa %rsp, 8
retq
.Lfunc_end0:
.size _Z3fooi, .Lfunc_end0-_Z3fooi
.cfi_endproc
# -- End function
.ident "clang version 11.0.0"
.section ".note.GNU-stack","",@progbits
.addrsig
+4 -4
View File
@@ -813,13 +813,13 @@ leaf_optimization (FTSENT const *p, int dir_fd)
#else
static bool
dirent_inode_sort_may_be_useful (FTSENT const *p _GL_UNUSED,
int dir_fd _GL_UNUSED)
dirent_inode_sort_may_be_useful (_GL_UNUSED FTSENT const *p,
_GL_UNUSED int dir_fd)
{
return true;
}
static enum leaf_optimization
leaf_optimization (FTSENT const *p _GL_UNUSED, int dir_fd _GL_UNUSED)
leaf_optimization (_GL_UNUSED FTSENT const *p, _GL_UNUSED int dir_fd)
{
return NO_LEAF_OPTIMIZATION;
}
@@ -1093,7 +1093,7 @@ cd_dot_dot:
*/
/* ARGSUSED */
int
fts_set(FTS *sp _GL_UNUSED, FTSENT *p, int instr)
fts_set(_GL_UNUSED FTS *sp, FTSENT *p, int instr)
{
if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW &&
instr != FTS_NOINSTR && instr != FTS_SKIP) {
+1 -1
View File
@@ -30,7 +30,7 @@
/* Provide a stub that fails with ENOSYS, since there is no group
information available on mingw. */
int
getgroups (int n _GL_UNUSED, GETGROUPS_T *groups _GL_UNUSED)
getgroups (_GL_UNUSED int n, _GL_UNUSED GETGROUPS_T *groups)
{
errno = ENOSYS;
return -1;
+2 -2
View File
@@ -378,8 +378,8 @@ process_long_option (int argc, char **argv, const char *optstring,
/* Initialize internal data upon the first call to getopt. */
static const char *
_getopt_initialize (int argc _GL_UNUSED,
char **argv _GL_UNUSED, const char *optstring,
_getopt_initialize (_GL_UNUSED int argc,
_GL_UNUSED char **argv, const char *optstring,
struct _getopt_data *d, int posixly_correct)
{
/* Start processing options with ARGV-element 1 (since ARGV-element 0
+4 -4
View File
@@ -36,10 +36,10 @@
defined in the library. */
int
getugroups (int maxcount _GL_UNUSED,
gid_t *grouplist _GL_UNUSED,
char const *username _GL_UNUSED,
gid_t gid _GL_UNUSED)
getugroups (_GL_UNUSED int maxcount,
_GL_UNUSED gid_t *grouplist,
_GL_UNUSED char const *username,
_GL_UNUSED gid_t gid)
{
errno = ENOSYS;
return -1;
+4 -4
View File
@@ -3095,7 +3095,7 @@ freelocale (locale_t locale)
static
# endif
const char *
gl_locale_name_thread_unsafe (int category, const char *categoryname _GL_UNUSED)
gl_locale_name_thread_unsafe (int category, _GL_UNUSED const char *categoryname)
{
# if HAVE_GOOD_USELOCALE
{
@@ -3210,7 +3210,7 @@ gl_locale_name_thread_unsafe (int category, const char *categoryname _GL_UNUSED)
#endif
const char *
gl_locale_name_thread (int category, const char *categoryname _GL_UNUSED)
gl_locale_name_thread (int category, _GL_UNUSED const char *categoryname)
{
#if HAVE_GOOD_USELOCALE
const char *name = gl_locale_name_thread_unsafe (category, categoryname);
@@ -3234,7 +3234,7 @@ gl_locale_name_thread (int category, const char *categoryname _GL_UNUSED)
#endif
const char *
gl_locale_name_posix (int category, const char *categoryname _GL_UNUSED)
gl_locale_name_posix (int category, _GL_UNUSED const char *categoryname)
{
#if defined WINDOWS_NATIVE
if (LC_MIN <= category && category <= LC_MAX)
@@ -3299,7 +3299,7 @@ gl_locale_name_posix (int category, const char *categoryname _GL_UNUSED)
}
const char *
gl_locale_name_environ (int category _GL_UNUSED, const char *categoryname)
gl_locale_name_environ (_GL_UNUSED int category, const char *categoryname)
{
const char *retval;
+1 -1
View File
@@ -48,7 +48,7 @@
/* This function is required at least for NetBSD 1.5.2. */
int
rpl_mkdir (char const *dir, mode_t mode maybe_unused)
rpl_mkdir (char const *dir, maybe_unused mode_t mode)
{
int ret_val;
char *tmp_dir;
+1 -1
View File
@@ -27,7 +27,7 @@
/* Mingw lacks mkfifo; always fail with ENOSYS. */
int
mkfifo (char const *name _GL_UNUSED, mode_t mode _GL_UNUSED)
mkfifo (_GL_UNUSED char const *name, _GL_UNUSED mode_t mode)
{
errno = ENOSYS;
return -1;
+2 -2
View File
@@ -66,8 +66,8 @@ rpl_mkfifoat (int fd, char const *file, mode_t mode)
/* Mingw lacks mkfifo, so this wrapper is trivial. */
int
mkfifoat (int fd _GL_UNUSED, char const *path _GL_UNUSED,
mode_t mode _GL_UNUSED)
mkfifoat (_GL_UNUSED int fd, _GL_UNUSED char const *path,
_GL_UNUSED mode_t mode)
{
errno = ENOSYS;
return -1;
+2 -2
View File
@@ -27,8 +27,8 @@
/* Mingw lacks mknod; always fail with ENOSYS. */
int
mknod (char const *name _GL_UNUSED, mode_t mode _GL_UNUSED,
dev_t dev _GL_UNUSED)
mknod (_GL_UNUSED char const *name, _GL_UNUSED mode_t mode,
_GL_UNUSED dev_t dev)
{
errno = ENOSYS;
return -1;
+2 -2
View File
@@ -66,8 +66,8 @@ rpl_mknodat (int fd, char const *file, mode_t mode, dev_t dev)
/* Mingw lacks mknod, so this wrapper is trivial. */
int
mknodat (int fd _GL_UNUSED, char const *path _GL_UNUSED,
mode_t mode _GL_UNUSED, dev_t dev _GL_UNUSED)
mknodat (_GL_UNUSED int fd, _GL_UNUSED char const *path,
_GL_UNUSED mode_t mode, _GL_UNUSED dev_t dev)
{
errno = ENOSYS;
return -1;
+1 -1
View File
@@ -202,7 +202,7 @@
/* All cygwin mount points include ':' or start with '//'; so it
requires a native Windows call to determine remote disks. */
static bool
me_remote (char const *fs_name, char const *fs_type _GL_UNUSED)
me_remote (char const *fs_name, _GL_UNUSED char const *fs_type)
{
if (fs_name[0] && fs_name[1] == ':')
{
+4 -4
View File
@@ -37,10 +37,10 @@ rpl_openpty (int *amaster, int *aslave, char *name,
# include <errno.h>
int
openpty (int *amaster _GL_UNUSED, int *aslave _GL_UNUSED,
char *name _GL_UNUSED,
struct termios const *termp _GL_UNUSED,
struct winsize const *winp _GL_UNUSED)
openpty (_GL_UNUSED int *amaster, _GL_UNUSED int *aslave,
_GL_UNUSED char *name,
_GL_UNUSED struct termios const *termp,
_GL_UNUSED struct winsize const *winp)
{
/* Mingw lacks pseudo-terminals altogether. */
errno = ENOSYS;
+2 -2
View File
@@ -1544,8 +1544,8 @@ yylex (union YYSTYPE *lvalp, parser_control *pc)
/* Do nothing if the parser reports an error. */
static int
yyerror (parser_control const *pc _GL_UNUSED,
char const *s _GL_UNUSED)
yyerror (_GL_UNUSED parser_control const *pc,
_GL_UNUSED char const *s)
{
return 0;
}
+2 -2
View File
@@ -90,7 +90,7 @@ sendfd (int sock, int fd)
}
#else
int
sendfd (int sock _GL_UNUSED, int fd _GL_UNUSED)
sendfd (_GL_UNUSED int sock, _GL_UNUSED int fd)
{
errno = ENOSYS;
return -1;
@@ -201,7 +201,7 @@ recvfd (int sock, int flags)
}
#else
int
recvfd (int sock _GL_UNUSED, int flags _GL_UNUSED)
recvfd (_GL_UNUSED int sock, _GL_UNUSED int flags)
{
errno = ENOSYS;
return -1;
+11 -11
View File
@@ -40,7 +40,7 @@ pthread_condattr_init (pthread_condattr_t *attr)
}
int
pthread_condattr_destroy (pthread_condattr_t *attr _GL_UNUSED)
pthread_condattr_destroy (_GL_UNUSED pthread_condattr_t *attr)
{
return 0;
}
@@ -52,7 +52,7 @@ pthread_condattr_destroy (pthread_condattr_t *attr _GL_UNUSED)
int
pthread_cond_init (pthread_cond_t *cond,
const pthread_condattr_t *attr _GL_UNUSED)
_GL_UNUSED const pthread_condattr_t *attr)
{
return glwthread_cond_init (cond);
}
@@ -100,16 +100,16 @@ pthread_cond_destroy (pthread_cond_t *cond)
/* Provide a dummy implementation for single-threaded applications. */
int
pthread_cond_init (pthread_cond_t *cond _GL_UNUSED,
const pthread_condattr_t *attr _GL_UNUSED)
pthread_cond_init (_GL_UNUSED pthread_cond_t *cond,
_GL_UNUSED const pthread_condattr_t *attr)
{
/* COND is never seriously used. */
return 0;
}
int
pthread_cond_wait (pthread_cond_t *cond _GL_UNUSED,
pthread_mutex_t *mutex _GL_UNUSED)
pthread_cond_wait (_GL_UNUSED pthread_cond_t *cond,
_GL_UNUSED pthread_mutex_t *mutex)
{
/* No other thread can signal this condition variable.
Wait endlessly. */
@@ -124,8 +124,8 @@ pthread_cond_wait (pthread_cond_t *cond _GL_UNUSED,
}
int
pthread_cond_timedwait (pthread_cond_t *cond _GL_UNUSED,
pthread_mutex_t *mutex _GL_UNUSED,
pthread_cond_timedwait (_GL_UNUSED pthread_cond_t *cond,
_GL_UNUSED pthread_mutex_t *mutex,
const struct timespec *abstime)
{
/* No other thread can signal this condition variable.
@@ -176,21 +176,21 @@ pthread_cond_timedwait (pthread_cond_t *cond _GL_UNUSED,
}
int
pthread_cond_signal (pthread_cond_t *cond _GL_UNUSED)
pthread_cond_signal (_GL_UNUSED pthread_cond_t *cond)
{
/* No threads can currently be blocked on COND. */
return 0;
}
int
pthread_cond_broadcast (pthread_cond_t *cond _GL_UNUSED)
pthread_cond_broadcast (_GL_UNUSED pthread_cond_t *cond)
{
/* No threads can currently be blocked on COND. */
return 0;
}
int
pthread_cond_destroy (pthread_cond_t *cond _GL_UNUSED)
pthread_cond_destroy (_GL_UNUSED pthread_cond_t *cond)
{
/* COND is never seriously used. */
return 0;
+9 -9
View File
@@ -77,7 +77,7 @@ pthread_mutexattr_setrobust (pthread_mutexattr_t *attr, int robust)
}
int
pthread_mutexattr_destroy (pthread_mutexattr_t *attr _GL_UNUSED)
pthread_mutexattr_destroy (_GL_UNUSED pthread_mutexattr_t *attr)
{
return 0;
}
@@ -207,15 +207,15 @@ pthread_mutex_destroy (pthread_mutex_t *mutex)
/* Provide a dummy implementation for single-threaded applications. */
int
pthread_mutex_init (pthread_mutex_t *mutex _GL_UNUSED,
const pthread_mutexattr_t *attr _GL_UNUSED)
pthread_mutex_init (_GL_UNUSED pthread_mutex_t *mutex,
_GL_UNUSED const pthread_mutexattr_t *attr)
{
/* MUTEX is never seriously used. */
return 0;
}
int
pthread_mutex_lock (pthread_mutex_t *mutex _GL_UNUSED)
pthread_mutex_lock (_GL_UNUSED pthread_mutex_t *mutex)
{
/* There is only one thread, so it always gets the lock. This
implementation does not support PTHREAD_MUTEX_ERRORCHECK. */
@@ -223,7 +223,7 @@ pthread_mutex_lock (pthread_mutex_t *mutex _GL_UNUSED)
}
int
pthread_mutex_trylock (pthread_mutex_t *mutex _GL_UNUSED)
pthread_mutex_trylock (_GL_UNUSED pthread_mutex_t *mutex)
{
/* There is only one thread, so it always gets the lock. This
implementation does not support PTHREAD_MUTEX_ERRORCHECK. */
@@ -231,8 +231,8 @@ pthread_mutex_trylock (pthread_mutex_t *mutex _GL_UNUSED)
}
int
pthread_mutex_timedlock (pthread_mutex_t *mutex _GL_UNUSED,
const struct timespec *abstime _GL_UNUSED)
pthread_mutex_timedlock (_GL_UNUSED pthread_mutex_t *mutex,
_GL_UNUSED const struct timespec *abstime)
{
/* There is only one thread, so it always gets the lock. This
implementation does not support PTHREAD_MUTEX_ERRORCHECK. */
@@ -240,7 +240,7 @@ pthread_mutex_timedlock (pthread_mutex_t *mutex _GL_UNUSED,
}
int
pthread_mutex_unlock (pthread_mutex_t *mutex _GL_UNUSED)
pthread_mutex_unlock (_GL_UNUSED pthread_mutex_t *mutex)
{
/* There is only one thread, so it always unlocks successfully.
This implementation does not support robust mutexes or
@@ -249,7 +249,7 @@ pthread_mutex_unlock (pthread_mutex_t *mutex _GL_UNUSED)
}
int
pthread_mutex_destroy (pthread_mutex_t *mutex _GL_UNUSED)
pthread_mutex_destroy (_GL_UNUSED pthread_mutex_t *mutex)
{
/* MUTEX is never seriously used. */
return 0;
+6 -6
View File
@@ -40,7 +40,7 @@ pthread_rwlockattr_init (pthread_rwlockattr_t *attr)
}
int
pthread_rwlockattr_destroy (pthread_rwlockattr_t *attr _GL_UNUSED)
pthread_rwlockattr_destroy (_GL_UNUSED pthread_rwlockattr_t *attr)
{
return 0;
}
@@ -52,7 +52,7 @@ pthread_rwlockattr_destroy (pthread_rwlockattr_t *attr _GL_UNUSED)
int
pthread_rwlock_init (pthread_rwlock_t *lock,
const pthread_rwlockattr_t *attr _GL_UNUSED)
_GL_UNUSED const pthread_rwlockattr_t *attr)
{
glwthread_timedrwlock_init (lock);
return 0;
@@ -115,7 +115,7 @@ pthread_rwlock_destroy (pthread_rwlock_t *lock)
int
pthread_rwlock_init (pthread_rwlock_t *lock,
const pthread_rwlockattr_t *attr _GL_UNUSED)
_GL_UNUSED const pthread_rwlockattr_t *attr)
{
int err;
@@ -485,7 +485,7 @@ pthread_rwlock_timedwrlock (pthread_rwlock_t *lock,
int
pthread_rwlock_init (pthread_rwlock_t *lock,
const pthread_rwlockattr_t *attr _GL_UNUSED)
_GL_UNUSED const pthread_rwlockattr_t *attr)
{
*lock = 0;
return 0;
@@ -523,14 +523,14 @@ pthread_rwlock_trywrlock (pthread_rwlock_t *lock)
int
pthread_rwlock_timedrdlock (pthread_rwlock_t *lock,
const struct timespec *abstime _GL_UNUSED)
_GL_UNUSED const struct timespec *abstime)
{
return pthread_rwlock_rdlock (lock);
}
int
pthread_rwlock_timedwrlock (pthread_rwlock_t *lock,
const struct timespec *abstime _GL_UNUSED)
_GL_UNUSED const struct timespec *abstime)
{
return pthread_rwlock_wrlock (lock);
}
+11 -11
View File
@@ -32,7 +32,7 @@
int
pthread_spin_init (pthread_spinlock_t *lock,
int shared_across_processes _GL_UNUSED)
_GL_UNUSED int shared_across_processes)
{
glwthread_spin_init (lock);
return 0;
@@ -81,7 +81,7 @@ pthread_spin_destroy (pthread_spinlock_t *lock)
int
pthread_spin_init (pthread_spinlock_t *lock,
int shared_across_processes _GL_UNUSED)
_GL_UNUSED int shared_across_processes)
{
__atomic_store_n ((unsigned int *) lock, 0, __ATOMIC_SEQ_CST);
return 0;
@@ -127,7 +127,7 @@ pthread_spin_unlock (pthread_spinlock_t *lock)
int
pthread_spin_init (pthread_spinlock_t *lock,
int shared_across_processes _GL_UNUSED)
_GL_UNUSED int shared_across_processes)
{
__atomic_clear (lock, __ATOMIC_SEQ_CST);
return 0;
@@ -173,7 +173,7 @@ pthread_spin_destroy (pthread_spinlock_t *lock)
int
pthread_spin_init (pthread_spinlock_t *lock,
int shared_across_processes _GL_UNUSED)
_GL_UNUSED int shared_across_processes)
{
* (volatile unsigned int *) lock = 0;
__sync_synchronize ();
@@ -217,7 +217,7 @@ pthread_spin_destroy (pthread_spinlock_t *lock)
int
pthread_spin_init (pthread_spinlock_t *lock,
int shared_across_processes _GL_UNUSED)
_GL_UNUSED int shared_across_processes)
{
return pthread_mutex_init (lock, NULL);
}
@@ -252,32 +252,32 @@ pthread_spin_destroy (pthread_spinlock_t *lock)
/* Provide a dummy implementation for single-threaded applications. */
int
pthread_spin_init (pthread_spinlock_t *lock _GL_UNUSED,
int shared_across_processes _GL_UNUSED)
pthread_spin_init (_GL_UNUSED pthread_spinlock_t *lock,
_GL_UNUSED int shared_across_processes)
{
return 0;
}
int
pthread_spin_lock (pthread_spinlock_t *lock _GL_UNUSED)
pthread_spin_lock (_GL_UNUSED pthread_spinlock_t *lock)
{
return 0;
}
int
pthread_spin_trylock (pthread_spinlock_t *lock _GL_UNUSED)
pthread_spin_trylock (_GL_UNUSED pthread_spinlock_t *lock)
{
return 0;
}
int
pthread_spin_unlock (pthread_spinlock_t *lock _GL_UNUSED)
pthread_spin_unlock (_GL_UNUSED pthread_spinlock_t *lock)
{
return 0;
}
int
pthread_spin_destroy (pthread_spinlock_t *lock _GL_UNUSED)
pthread_spin_destroy (_GL_UNUSED pthread_spinlock_t *lock)
{
return 0;
}
+1 -1
View File
@@ -57,7 +57,7 @@ pthread_attr_setdetachstate (pthread_attr_t *attr, int detachstate)
}
int
pthread_attr_destroy (pthread_attr_t *attr _GL_UNUSED)
pthread_attr_destroy (_GL_UNUSED pthread_attr_t *attr)
{
return 0;
}
+2 -2
View File
@@ -29,8 +29,8 @@
such as DJGPP 2.03 and mingw32. */
ssize_t
readlink (char const *file, char *buf _GL_UNUSED,
size_t bufsize _GL_UNUSED)
readlink (char const *file, _GL_UNUSED char *buf,
_GL_UNUSED size_t bufsize)
{
struct stat statbuf;
+1 -1
View File
@@ -287,7 +287,7 @@ rpl_rename (char const *src, char const *dst)
char *dst_temp = (char *) dst;
bool src_slash;
bool dst_slash;
bool dst_exists _GL_UNUSED;
_GL_UNUSED bool dst_exists;
int ret_val = -1;
int rename_errno = ENOTDIR;
struct stat src_st;
+1 -1
View File
@@ -775,7 +775,7 @@ chmod_or_fchmod (const char *name, int desc, mode_t mode)
int
set_permissions (struct permission_context *ctx, const char *name, int desc)
{
bool acls_set _GL_UNUSED = false;
_GL_UNUSED bool acls_set = false;
bool early_chmod;
bool must_chmod = false;
int ret = 0;
+1 -1
View File
@@ -113,7 +113,7 @@ static int initialized_sockets_version /* = 0 */;
#endif /* WINDOWS_SOCKETS */
int
gl_sockets_startup (int version _GL_UNUSED)
gl_sockets_startup (_GL_UNUSED int version)
{
#if WINDOWS_SOCKETS
if (version > initialized_sockets_version)
+3 -3
View File
@@ -102,7 +102,7 @@ get_stat_mtime_ns (struct stat const *st)
/* Return the nanosecond component of *ST's birth time. */
_GL_STAT_TIME_INLINE long int _GL_ATTRIBUTE_PURE
get_stat_birthtime_ns (struct stat const *st _GL_UNUSED)
get_stat_birthtime_ns (_GL_UNUSED struct stat const *st)
{
# if defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC
return STAT_TIMESPEC (st, st_birthtim).tv_nsec;
@@ -158,7 +158,7 @@ get_stat_mtime (struct stat const *st)
/* Return *ST's birth time, if available; otherwise return a value
with tv_sec and tv_nsec both equal to -1. */
_GL_STAT_TIME_INLINE struct timespec _GL_ATTRIBUTE_PURE
get_stat_birthtime (struct stat const *st _GL_UNUSED)
get_stat_birthtime (_GL_UNUSED struct stat const *st)
{
struct timespec t;
@@ -208,7 +208,7 @@ get_stat_birthtime (struct stat const *st _GL_UNUSED)
errno to EOVERFLOW if normalization overflowed. This function
is intended to be private to this .h file. */
_GL_STAT_TIME_INLINE int
stat_time_normalize (int result, struct stat *st _GL_UNUSED)
stat_time_normalize (int result, _GL_UNUSED struct stat *st)
{
#if defined __sun && defined STAT_TIMESPEC
if (result == 0)
+1 -1
View File
@@ -684,7 +684,7 @@ __strptime_internal (rp, fmt, tm, decided, era_cnt LOCALE_PARAM)
specify hours. If fours digits are used, minutes are
also specified. */
{
bool neg _GL_UNUSED;
_GL_UNUSED bool neg;
int n;
val = 0;
+1 -1
View File
@@ -106,7 +106,7 @@ decimal_point_char (void)
#undef LDEXP
#define LDEXP dummy_ldexp
/* A dummy definition that will never be invoked. */
static DOUBLE LDEXP (DOUBLE x _GL_UNUSED, int exponent _GL_UNUSED)
static DOUBLE LDEXP (_GL_UNUSED DOUBLE x, _GL_UNUSED int exponent)
{
abort ();
return L_(0.0);
+2 -2
View File
@@ -47,8 +47,8 @@ rpl_symlink (char const *contents, char const *name)
/* The system does not support symlinks. */
int
symlink (char const *contents _GL_UNUSED,
char const *name _GL_UNUSED)
symlink (_GL_UNUSED char const *contents,
_GL_UNUSED char const *name)
{
errno = ENOSYS;
return -1;
+2 -2
View File
@@ -52,8 +52,8 @@ rpl_symlinkat (char const *contents, int fd, char const *name)
wrapper than to go through at-func.c to call rpl_symlink. */
int
symlinkat (char const *path1 _GL_UNUSED, int fd _GL_UNUSED,
char const *path2 _GL_UNUSED)
symlinkat (_GL_UNUSED char const *path1, _GL_UNUSED int fd,
_GL_UNUSED char const *path2)
{
errno = ENOSYS;
return -1;
+2 -2
View File
@@ -181,13 +181,13 @@ try_file (char *tmpl, void *flags)
}
static int
try_dir (char *tmpl, void *flags _GL_UNUSED)
try_dir (char *tmpl, _GL_UNUSED void *flags)
{
return __mkdir (tmpl, S_IRUSR | S_IWUSR | S_IXUSR);
}
static int
try_nocreate (char *tmpl, void *flags _GL_UNUSED)
try_nocreate (char *tmpl, _GL_UNUSED void *flags)
{
struct_stat64 st;
+46 -46
View File
@@ -167,38 +167,38 @@ typedef ostream_t styled_ostream_t;
#define styled_ostream_free ostream_free
static inline void
styled_ostream_begin_use_class (styled_ostream_t stream _GL_UNUSED,
const char *classname _GL_UNUSED)
styled_ostream_begin_use_class (_GL_UNUSED styled_ostream_t stream,
_GL_UNUSED const char *classname)
{
}
static inline void
styled_ostream_end_use_class (styled_ostream_t stream _GL_UNUSED,
const char *classname _GL_UNUSED)
styled_ostream_end_use_class (_GL_UNUSED styled_ostream_t stream,
_GL_UNUSED const char *classname)
{
}
static inline const char *
styled_ostream_get_hyperlink_ref (styled_ostream_t stream _GL_UNUSED)
styled_ostream_get_hyperlink_ref (_GL_UNUSED styled_ostream_t stream)
{
return NULL;
}
static inline const char *
styled_ostream_get_hyperlink_id (styled_ostream_t stream _GL_UNUSED)
styled_ostream_get_hyperlink_id (_GL_UNUSED styled_ostream_t stream)
{
return NULL;
}
static inline void
styled_ostream_set_hyperlink (styled_ostream_t stream _GL_UNUSED,
const char *ref _GL_UNUSED,
const char *id _GL_UNUSED)
styled_ostream_set_hyperlink (_GL_UNUSED styled_ostream_t stream,
_GL_UNUSED const char *ref,
_GL_UNUSED const char *id)
{
}
static inline void
styled_ostream_flush_to_current_style (styled_ostream_t stream _GL_UNUSED)
styled_ostream_flush_to_current_style (_GL_UNUSED styled_ostream_t stream)
{
}
@@ -225,8 +225,8 @@ typedef ostream_t fd_ostream_t;
#define fd_ostream_free ostream_free
static inline fd_ostream_t
fd_ostream_create (int fd, const char *filename _GL_UNUSED,
bool buffered _GL_UNUSED)
fd_ostream_create (int fd, _GL_UNUSED const char *filename,
_GL_UNUSED bool buffered)
{
if (fd == 1)
return stdout;
@@ -272,81 +272,81 @@ typedef ostream_t term_ostream_t;
#define term_ostream_free ostream_free
static inline term_color_t
term_ostream_get_color (term_ostream_t stream _GL_UNUSED)
term_ostream_get_color (_GL_UNUSED term_ostream_t stream)
{
return COLOR_DEFAULT;
}
static inline void
term_ostream_set_color (term_ostream_t stream _GL_UNUSED,
term_color_t color _GL_UNUSED)
term_ostream_set_color (_GL_UNUSED term_ostream_t stream,
_GL_UNUSED term_color_t color)
{
}
static inline term_color_t
term_ostream_get_bgcolor (term_ostream_t stream _GL_UNUSED)
term_ostream_get_bgcolor (_GL_UNUSED term_ostream_t stream)
{
return COLOR_DEFAULT;
}
static inline void
term_ostream_set_bgcolor (term_ostream_t stream _GL_UNUSED,
term_color_t color _GL_UNUSED)
term_ostream_set_bgcolor (_GL_UNUSED term_ostream_t stream,
_GL_UNUSED term_color_t color)
{
}
static inline term_weight_t
term_ostream_get_weight (term_ostream_t stream _GL_UNUSED)
term_ostream_get_weight (_GL_UNUSED term_ostream_t stream)
{
return WEIGHT_DEFAULT;
}
static inline void
term_ostream_set_weight (term_ostream_t stream _GL_UNUSED,
term_weight_t weight _GL_UNUSED)
term_ostream_set_weight (_GL_UNUSED term_ostream_t stream,
_GL_UNUSED term_weight_t weight)
{
}
static inline term_posture_t
term_ostream_get_posture (term_ostream_t stream _GL_UNUSED)
term_ostream_get_posture (_GL_UNUSED term_ostream_t stream)
{
return POSTURE_DEFAULT;
}
static inline void
term_ostream_set_posture (term_ostream_t stream _GL_UNUSED,
term_posture_t posture _GL_UNUSED)
term_ostream_set_posture (_GL_UNUSED term_ostream_t stream,
_GL_UNUSED term_posture_t posture)
{
}
static inline term_underline_t
term_ostream_get_underline (term_ostream_t stream _GL_UNUSED)
term_ostream_get_underline (_GL_UNUSED term_ostream_t stream)
{
return UNDERLINE_DEFAULT;
}
static inline void
term_ostream_set_underline (term_ostream_t stream _GL_UNUSED,
term_underline_t underline _GL_UNUSED)
term_ostream_set_underline (_GL_UNUSED term_ostream_t stream,
_GL_UNUSED term_underline_t underline)
{
}
static inline const char *
term_ostream_get_hyperlink_ref (term_ostream_t stream _GL_UNUSED)
term_ostream_get_hyperlink_ref (_GL_UNUSED term_ostream_t stream)
{
return NULL;
}
static inline const char *
term_ostream_get_hyperlink_id (term_ostream_t stream _GL_UNUSED)
term_ostream_get_hyperlink_id (_GL_UNUSED term_ostream_t stream)
{
return NULL;
}
static inline void
term_ostream_set_hyperlink (term_ostream_t stream _GL_UNUSED,
const char *ref _GL_UNUSED,
const char *id _GL_UNUSED)
term_ostream_set_hyperlink (_GL_UNUSED term_ostream_t stream,
_GL_UNUSED const char *ref,
_GL_UNUSED const char *id)
{
}
@@ -374,7 +374,7 @@ typedef enum
static inline term_ostream_t
term_ostream_create (int fd, const char *filename,
ttyctl_t tty_control _GL_UNUSED)
_GL_UNUSED ttyctl_t tty_control)
{
return fd_ostream_create (fd, filename, true);
}
@@ -395,8 +395,8 @@ typedef styled_ostream_t term_styled_ostream_t;
static inline term_styled_ostream_t
term_styled_ostream_create (int fd, const char *filename,
ttyctl_t tty_control _GL_UNUSED,
const char *css_filename _GL_UNUSED)
_GL_UNUSED ttyctl_t tty_control,
_GL_UNUSED const char *css_filename)
{
return fd_ostream_create (fd, filename, true);
}
@@ -406,8 +406,8 @@ term_styled_ostream_create (int fd, const char *filename,
typedef styled_ostream_t html_styled_ostream_t;
static inline html_styled_ostream_t
html_styled_ostream_create (ostream_t destination _GL_UNUSED,
const char *css_filename _GL_UNUSED)
html_styled_ostream_create (_GL_UNUSED ostream_t destination,
_GL_UNUSED const char *css_filename)
{
abort ();
return NULL;
@@ -423,13 +423,13 @@ enum color_option { color_no, color_tty, color_yes, color_html };
#define style_file_name NULL
static inline bool
handle_color_option (const char *option _GL_UNUSED)
handle_color_option (_GL_UNUSED const char *option)
{
return false;
}
static inline void
handle_style_option (const char *option _GL_UNUSED)
handle_style_option (_GL_UNUSED const char *option)
{
}
@@ -440,10 +440,10 @@ print_color_test (void)
}
static inline void
style_file_prepare (const char *style_file_envvar _GL_UNUSED,
const char *stylesdir_envvar _GL_UNUSED,
const char *stylesdir_after_install _GL_UNUSED,
const char *default_style_file _GL_UNUSED)
style_file_prepare (_GL_UNUSED const char *style_file_envvar,
_GL_UNUSED const char *stylesdir_envvar,
_GL_UNUSED const char *stylesdir_after_install,
_GL_UNUSED const char *default_style_file)
{
}
@@ -451,14 +451,14 @@ style_file_prepare (const char *style_file_envvar _GL_UNUSED,
static inline styled_ostream_t
styled_ostream_create (int fd, const char *filename,
ttyctl_t tty_control _GL_UNUSED,
const char *css_filename _GL_UNUSED)
_GL_UNUSED ttyctl_t tty_control,
_GL_UNUSED const char *css_filename)
{
return fd_ostream_create (fd, filename, true);
}
static inline void
libtextstyle_set_failure_exit_code (int exit_code _GL_UNUSED)
libtextstyle_set_failure_exit_code (_GL_UNUSED int exit_code)
{
}
+2 -2
View File
@@ -192,7 +192,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 _GL_UNUSED)
_GL_UNUSED void *callback_arg)
{
if (msg == NULL)
error (1, 0, _("cannot convert U+%04X to local character set"), code);
@@ -206,7 +206,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 _GL_UNUSED,
_GL_UNUSED const char *msg,
void *callback_arg)
{
FILE *stream = (FILE *) callback_arg;
+1 -1
View File
@@ -105,7 +105,7 @@ cleanup_slaves (void)
/* The cleanup action, taking a signal argument.
It gets called asynchronously. */
static _GL_ASYNC_SAFE void
cleanup_slaves_action (int sig _GL_UNUSED)
cleanup_slaves_action (_GL_UNUSED int sig)
{
cleanup_slaves ();
}
+2 -2
View File
@@ -302,6 +302,8 @@ AC_DEFUN([gl_COMMON_BODY], [
#else
# define _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_UNUSED
#endif
/* Alternative spelling of this macro, for convenience. */
#define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED
/* Earlier spellings of this macro. */
#define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED
@@ -409,8 +411,6 @@ AC_DEFUN([gl_COMMON_BODY], [
#else
# define _GL_ATTRIBUTE_UNUSED
#endif
/* Alternative spelling of this macro, for convenience. */
#define _GL_UNUSED _GL_ATTRIBUTE_UNUSED
]dnl There is no _GL_ATTRIBUTE_VISIBILITY; see m4/visibility.m4 instead.
[
+1 -1
View File
@@ -43,6 +43,6 @@
# define SIGNATURE_CHECK1(fn, ret, args, id) \
SIGNATURE_CHECK2 (fn, ret, args, id) /* macroexpand line */
# define SIGNATURE_CHECK2(fn, ret, args, id) \
static ret (* _GL_UNUSED signature_check ## id) args = fn
_GL_UNUSED static ret (*signature_check ## id) args = fn
#endif /* SIGNATURE_CHECK */
+1 -1
View File
@@ -38,7 +38,7 @@
/* Wrapper for testing areadlink. */
static char *
do_areadlink (char const *name, size_t ignored _GL_UNUSED)
do_areadlink (char const *name, _GL_UNUSED size_t ignored)
{
return areadlink (name);
}
+1 -1
View File
@@ -40,7 +40,7 @@ static int dfd = AT_FDCWD;
/* Wrapper for testing areadlinkat. */
static char *
do_areadlinkat (char const *name, size_t ignored _GL_UNUSED)
do_areadlinkat (char const *name, _GL_UNUSED size_t ignored)
{
return areadlinkat (dfd, name);
}
+1 -1
View File
@@ -36,7 +36,7 @@ dummy (float f)
}
int
main (int argc, char **argv _GL_UNUSED)
main (int argc, _GL_UNUSED char **argv)
{
float (*my_ceilf) (float) = argc ? ceilf : dummy;
+1 -1
View File
@@ -41,7 +41,7 @@ dummy (float f)
}
int
main (int argc, char **argv _GL_UNUSED)
main (int argc, _GL_UNUSED char **argv)
{
float (*my_ceilf) (float) = argc ? ceilf : dummy;
+1 -1
View File
@@ -21,7 +21,7 @@
#include <dirent.h>
/* Check for existence of required types. */
static DIR *dir _GL_UNUSED;
_GL_UNUSED static DIR *dir;
static struct dirent d;
static ino_t i;
+1 -1
View File
@@ -68,7 +68,7 @@ do_lchown (char const *name, uid_t user, gid_t group)
}
int
main (int argc _GL_UNUSED, char *argv[])
main (_GL_UNUSED int argc, char *argv[])
{
int result1; /* Skip because of no chown/symlink support. */
int result2; /* Skip because of no lchown support. */
+1 -1
View File
@@ -30,7 +30,7 @@ SIGNATURE_CHECK (fdopendir, DIR *, (int));
#include "macros.h"
int
main (int argc _GL_UNUSED, char *argv[])
main (_GL_UNUSED int argc, char *argv[])
{
DIR *d;
int fd;
+1 -1
View File
@@ -31,7 +31,7 @@
int
main (int argc _GL_UNUSED, char *argv[])
main (_GL_UNUSED int argc, char *argv[])
{
static char const *const tests[][3] =
{
+1 -1
View File
@@ -30,7 +30,7 @@ SIGNATURE_CHECK (floor, double, (double));
#include "macros.h"
int
main (int argc, char **argv _GL_UNUSED)
main (int argc, _GL_UNUSED char **argv)
{
/* Zero. */
ASSERT (floor (0.0) == 0.0);
+1 -1
View File
@@ -36,7 +36,7 @@ dummy (float f)
}
int
main (int argc, char **argv _GL_UNUSED)
main (int argc, _GL_UNUSED char **argv)
{
float (*my_floorf) (float) = argc ? floorf : dummy;
+1 -1
View File
@@ -41,7 +41,7 @@ dummy (float f)
}
int
main (int argc, char **argv _GL_UNUSED)
main (int argc, _GL_UNUSED char **argv)
{
float (*my_floorf) (float) = argc ? floorf : dummy;
+1 -1
View File
@@ -34,7 +34,7 @@ SIGNATURE_CHECK (fseeko, int, (FILE *, off_t, int));
#endif
int
main (int argc, char **argv _GL_UNUSED)
main (int argc, _GL_UNUSED char **argv)
{
/* Assume stdin is non-empty, seekable, and starts with '#!/bin/sh'
iff argc > 1. */
+1 -1
View File
@@ -67,7 +67,7 @@ do_lstat (char const *name, struct stat *st)
}
int
main (int argc _GL_UNUSED, char *argv[])
main (_GL_UNUSED int argc, char *argv[])
{
int result;
+1 -1
View File
@@ -34,7 +34,7 @@ SIGNATURE_CHECK (ftello, off_t, (FILE *));
#endif
int
main (int argc, char **argv _GL_UNUSED)
main (int argc, _GL_UNUSED char **argv)
{
int ch;
/* Assume stdin is seekable iff argc > 1. */
+1 -1
View File
@@ -32,7 +32,7 @@ SIGNATURE_CHECK (getdomainname, int, (char *, size_t));
#define NODOMAINNAME "magic-gnulib-test-string"
int
main (int argc, char *argv[] _GL_UNUSED)
main (int argc, _GL_UNUSED char *argv[])
{
char buf[YPMAXDOMAIN];
int rc;
+1 -1
View File
@@ -40,7 +40,7 @@ SIGNATURE_CHECK (getgroups, int, (int, gid_t[]));
#endif
int
main (int argc, char **argv _GL_UNUSED)
main (int argc, _GL_UNUSED char **argv)
{
int result;
gid_t *groups;
+1 -1
View File
@@ -33,7 +33,7 @@ SIGNATURE_CHECK (gethostname, int, (char *, size_t));
#define NOHOSTNAME "magic-gnulib-test-string"
int
main (int argc, char *argv[] _GL_UNUSED)
main (int argc, _GL_UNUSED char *argv[])
{
char buf[HOST_NAME_MAX];
int rc;
+1 -1
View File
@@ -34,7 +34,7 @@
OVERLOADED_CHECK (func, rettype2, parameters2, _2); \
OVERLOADED_CHECK (func, rettype3, parameters3, _3)
#define OVERLOADED_CHECK(func, rettype, parameters, suffix) \
static rettype (* _GL_UNUSED signature_check_ ## func ## suffix) parameters \
_GL_UNUSED static rettype (* signature_check_ ## func ## suffix) parameters \
= static_cast<rettype(*)parameters>(GNULIB_NAMESPACE::func)
+1 -1
View File
@@ -47,7 +47,7 @@ do_mkdir (char const *name, mode_t mode)
}
int
main (int argc _GL_UNUSED, char *argv[])
main (_GL_UNUSED int argc, char *argv[])
{
int result;
+1 -1
View File
@@ -58,7 +58,7 @@ do_open (char const *name, int flags, ...)
}
int
main (int argc _GL_UNUSED, char *argv[])
main (_GL_UNUSED int argc, char *argv[])
{
int result;
+1 -1
View File
@@ -111,7 +111,7 @@ gmt_offset (time_t s)
}
int
main (int argc _GL_UNUSED, char **argv)
main (_GL_UNUSED int argc, char **argv)
{
struct timespec result;
struct timespec result2;
+1 -1
View File
@@ -255,7 +255,7 @@ use_quote_double_quotes (const char *str, size_t *len)
}
int
main (int argc _GL_UNUSED, char *argv[])
main (_GL_UNUSED int argc, char *argv[])
{
int i;
bool ascii_only = MB_CUR_MAX == 1 && !isprint ((unsigned char) LQ[0]);
+1 -1
View File
@@ -60,7 +60,7 @@ static struct result_groups locale_results[] = {
#endif /* ENABLE_NLS */
int
main (int argc _GL_UNUSED, char *argv[])
main (_GL_UNUSED int argc, char *argv[])
{
#if ENABLE_NLS
/* Clean up environment. */
+1 -1
View File
@@ -41,7 +41,7 @@
#endif
int
main (int argc, char *argv[] _GL_UNUSED)
main (int argc, _GL_UNUSED char *argv[])
{
char origname[HOST_NAME_MAX];
char newname[HOST_NAME_MAX];
+1 -1
View File
@@ -56,7 +56,7 @@ unlinker (char const *name)
}
int
main (int argc _GL_UNUSED, char *argv[])
main (_GL_UNUSED int argc, char *argv[])
{
/* FIXME: Add tests of fd other than ".". */
int result1;
+1 -1
View File
@@ -23,7 +23,7 @@
#define AUTHORS "Sergey Poznyakoff", "Eric Blake"
int
main (int argc _GL_UNUSED, char **argv)
main (_GL_UNUSED int argc, char **argv)
{
version_etc (stdout, "test-version-etc", "dummy", "0", AUTHORS,
(const char *) NULL);
+1 -1
View File
@@ -21,7 +21,7 @@
#include "xalloc.h"
int
main (int argc _GL_UNUSED, char **argv)
main (_GL_UNUSED int argc, char **argv)
{
xalloc_die ();
return 0;
+1 -1
View File
@@ -30,7 +30,7 @@
#include "test-fprintf-posix.h"
int
main (int argc _GL_UNUSED, char *argv[])
main (_GL_UNUSED int argc, char *argv[])
{
test_function (xfprintf);
return 0;
+1 -1
View File
@@ -29,7 +29,7 @@
#include "test-printf-posix.h"
int
main (int argc _GL_UNUSED, char *argv[])
main (_GL_UNUSED int argc, char *argv[])
{
test_function (xprintf);
return 0;
+1 -1
View File
@@ -126,7 +126,7 @@ test_xasprintf (void)
}
int
main (int argc _GL_UNUSED, char *argv[])
main (_GL_UNUSED int argc, char *argv[])
{
test_xvasprintf ();
test_xasprintf ();