maint: minor cleanups
authorEric Blake <ebb9@byu.net>
Wed, 7 Oct 2009 20:49:38 +0000 (14:49 -0600)
committerEric Blake <ebb9@byu.net>
Thu, 8 Oct 2009 01:22:07 +0000 (19:22 -0600)
* 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>
ChangeLog
lib/fts.c
lib/getdate.y
lib/utimens.c
modules/linkat-tests

index a8fc68c..d7ba020 100644 (file)
--- 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.
index 041f9f0..40a837e 100644 (file)
--- 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) {
index f022710..94160b2 100644 (file)
    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;
 }
index 86c1c5a..10d2c82 100644 (file)
@@ -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
index 9fb6505..1f9aafa 100644 (file)
@@ -1,4 +1,5 @@
 Files:
+tests/test-link.h
 tests/test-linkat.c
 
 Depends-on: