summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2005-04-09 14:19:49 +0000
committerJim Meyering <jim@meyering.net>2005-04-09 14:19:49 +0000
commitc06188c05c03bd518ca2d6ae77fdc25cb8d16195 (patch)
tree9180335747f42031d1334383c297964a2b05117d /lib
parente115c60a2a77967e309f55b5e711474116c92883 (diff)
downloadcoreutils-c06188c05c03bd518ca2d6ae77fdc25cb8d16195.tar.xz
(__attribute__, ATTRIBUTE_UNUSED): Define.
Mark parameter `sp' with ATTRIBUTE_UNUSED.
Diffstat (limited to 'lib')
-rw-r--r--lib/fts.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/fts.c b/lib/fts.c
index fe7159ebf..c4f704dcb 100644
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -142,6 +142,16 @@ int rpl_lstat (const char *, struct stat *);
# define __set_errno(Val) errno = (Val)
#endif
+#ifndef __attribute__
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
+# define __attribute__(x) /* empty */
+# endif
+#endif
+
+#ifndef ATTRIBUTE_UNUSED
+# define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
+#endif
+
static FTSENT *fts_alloc __P((FTS *, const char *, size_t)) internal_function;
static FTSENT *fts_build __P((FTS *, int)) internal_function;
@@ -746,10 +756,7 @@ name: t = sp->fts_path + NAPPEND(p->fts_parent);
*/
/* ARGSUSED */
int
-fts_set(sp, p, instr)
- FTS *sp;
- FTSENT *p;
- int instr;
+fts_set(FTS *sp ATTRIBUTE_UNUSED, FTSENT *p, int instr)
{
if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW &&
instr != FTS_NOINSTR && instr != FTS_SKIP) {