Mercurial > hg > octave-kai > gnulib-hg
changeset 12134:38bf74d9a9a0
maint: minor cleanups
* lib/fts.c (ATTRIBUTE_UNUSED): Delete; use gnulib-guaranteed
_ATTRIBUTE_UNUSED instead.
* lib/getdate.y (ATTRIBUTE_UNUSED): Likewise.
* lib/utimens.c (ATTRIBUTE_UNUSED): Likewise.
* modules/linkat-tests (Files): Distribute test-link.h.
Signed-off-by: Eric Blake <ebb9@byu.net>
author | Eric Blake <ebb9@byu.net> |
---|---|
date | Wed, 07 Oct 2009 14:49:38 -0600 |
parents | 799664c0f270 |
children | 1e701cd8a52d |
files | ChangeLog lib/fts.c lib/getdate.y lib/utimens.c modules/linkat-tests |
diffstat | 5 files changed, 14 insertions(+), 36 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2009-10-07 Eric Blake <ebb9@byu.net> + maint: minor cleanups + * lib/fts.c (ATTRIBUTE_UNUSED): Delete; use gnulib-guaranteed + _UNUSED_PARAMETER_ instead. + * lib/getdate.y (ATTRIBUTE_UNUSED): Likewise. + * lib/utimens.c (ATTRIBUTE_UNUSED): Likewise. + * modules/linkat-tests (Files): Distribute test-link.h. + openat, utimens: whitespace cleanup * lib/openat.c: Prefer space throughout, rather than mix of 8 spaces vs. tabs.
--- a/lib/fts.c +++ b/lib/fts.c @@ -173,16 +173,6 @@ # define __set_errno(Val) errno = (Val) #endif -#ifndef __attribute__ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) -# define __attribute__(x) /* empty */ -# endif -#endif - -#ifndef ATTRIBUTE_UNUSED -# define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) -#endif - /* If this host provides the openat function, then we can avoid attempting to open "." in some initialization code below. */ #ifdef HAVE_OPENAT @@ -727,9 +717,9 @@ #else static bool -dirent_inode_sort_may_be_useful (int dir_fd ATTRIBUTE_UNUSED) { return true; } +dirent_inode_sort_may_be_useful (int dir_fd _UNUSED_PARAMETER_) { return true; } static bool -leaf_optimization_applies (int dir_fd ATTRIBUTE_UNUSED) { return false; } +leaf_optimization_applies (int dir_fd _UNUSED_PARAMETER_) { return false; } #endif #if GNULIB_FTS @@ -1079,7 +1069,7 @@ */ /* ARGSUSED */ int -fts_set(FTS *sp ATTRIBUTE_UNUSED, FTSENT *p, int instr) +fts_set(FTS *sp _UNUSED_PARAMETER_, 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 @@ -78,16 +78,6 @@ of `digit' even when the host does not conform to POSIX. */ #define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9) -#ifndef __attribute__ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__ -# define __attribute__(x) -# endif -#endif - -#ifndef ATTRIBUTE_UNUSED -# define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) -#endif - /* Shift A right by B bits portably, by dividing A by 2**B and truncating towards minus infinity. A and B should be free of side effects, and B should be in the range 0 <= B <= INT_BITS - 2, where @@ -1155,8 +1145,8 @@ /* Do nothing if the parser reports an error. */ static int -yyerror (parser_control const *pc ATTRIBUTE_UNUSED, - char const *s ATTRIBUTE_UNUSED) +yyerror (parser_control const *pc _UNUSED_PARAMETER_, + char const *s _UNUSED_PARAMETER_) { return 0; }
--- a/lib/utimens.c +++ b/lib/utimens.c @@ -44,16 +44,6 @@ }; #endif -#ifndef __attribute__ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) -# define __attribute__(x) -# endif -#endif - -#ifndef ATTRIBUTE_UNUSED -# define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) -#endif - /* Set the access and modification time stamps of FD (a.k.a. FILE) to be TIMESPEC[0] and TIMESPEC[1], respectively. FD must be either negative -- in which case it is ignored -- @@ -65,7 +55,7 @@ Return 0 on success, -1 (setting errno) on failure. */ int -gl_futimens (int fd ATTRIBUTE_UNUSED, +gl_futimens (int fd _UNUSED_PARAMETER_, char const *file, struct timespec const timespec[2]) { /* Some Linux-based NFS clients are buggy, and mishandle time stamps