From: Pádraig Brady
Date: Thu, 20 Jul 2023 14:08:27 +0000 (+0100)
Subject: fts: fix compilation errors with fts_cross_check()
X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=d08e8302729a31237fa92a147dfc3abb5d08fc48;p=gnulib.git
fts: fix compilation errors with fts_cross_check()
* lib/fts.c: Fix printf format chars.
* lib/fts_.h: Provide a declaration for users.
---
diff --git a/ChangeLog b/ChangeLog
index 3dfedd8e32..8170476837 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-07-20 Pádraig Brady
+
+ fts: fix compilation errors with fts_cross_check()
+ * lib/fts.c: Fix printf format chars.
+ * lib/fts_.h: Provide a declaration for users.
+
2023-07-19 Bruno Haible
c32swidth: Fix file list.
diff --git a/lib/fts.c b/lib/fts.c
index 884b84a5a1..875fe05793 100644
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -1736,11 +1736,11 @@ fd_ring_print (FTS const *sp, FILE *stream, char const *msg)
{
int fd = fd_ring->ir_data[i];
if (fd < 0)
- fprintf (stream, "%d: %d:\n", i, fd);
+ fprintf (stream, "%u: %d:\n", i, fd);
else
{
struct devino wd = getdevino (fd);
- fprintf (stream, "%d: %d: "PRINT_DEVINO"\n", i, fd, wd.dev, wd.ino);
+ fprintf (stream, "%u: %d: "PRINT_DEVINO"\n", i, fd, wd.dev, wd.ino);
}
if (i == fd_ring->ir_back)
break;
diff --git a/lib/fts_.h b/lib/fts_.h
index fa3d4146e2..67348b38fa 100644
--- a/lib/fts_.h
+++ b/lib/fts_.h
@@ -271,6 +271,10 @@ _GL_ATTRIBUTE_NODISCARD
FTSENT *fts_read (FTS *) __THROW;
int fts_set (FTS *, FTSENT *, int) __THROW;
+
+#if GNULIB_FTS_DEBUG
+void fts_cross_check (FTS const *);
+#endif
__END_DECLS
#endif /* fts.h */