summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--lib/fts.c16
-rw-r--r--lib/getdate.y14
-rw-r--r--lib/utimens.c12
-rw-r--r--modules/linkat-tests1
5 files changed, 14 insertions, 36 deletions
diff --git a/ChangeLog b/ChangeLog
index a8fc68cf28..d7ba020e2d 100644
--- 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.
diff --git a/lib/fts.c b/lib/fts.c
index 041f9f0704..40a837ed87 100644
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -173,16 +173,6 @@ enum Fts_stat
# 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 @@ leaf_optimization_applies (int dir_fd)
#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 @@ check_for_dir:
*/
/* 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) {
diff --git a/lib/getdate.y b/lib/getdate.y
index f022710817..94160b266b 100644
--- 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 @@ yylex (YYSTYPE *lvalp, parser_control *pc)
/* 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;
}
diff --git a/lib/utimens.c b/lib/utimens.c
index 86c1c5a222..10d2c8246f 100644
--- a/lib/utimens.c
+++ b/lib/utimens.c
@@ -44,16 +44,6 @@ struct utimbuf
};
#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 @@ struct utimbuf
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
diff --git a/modules/linkat-tests b/modules/linkat-tests
index 9fb6505201..1f9aafae2f 100644
--- a/modules/linkat-tests
+++ b/modules/linkat-tests
@@ -1,4 +1,5 @@
Files:
+tests/test-link.h
tests/test-linkat.c
Depends-on: