From d1336daf875d88f2cf67b77dff958b4722b38192 Mon Sep 17 00:00:00 2001
From: =?utf8?q?P=C3=A1draig=20Brady?=
Date: Thu, 20 Jul 2023 15:08:27 +0100
Subject: [PATCH] fts: fix compilation errors with fts_cross_check()
* lib/fts.c: Fix printf format chars.
* lib/fts_.h: Provide a declaration for users.
---
ChangeLog | 6 ++++++
lib/fts.c | 4 ++--
lib/fts_.h | 4 ++++
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8d6e3aab2e..844f61fd4d 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
Document migration path for obsolescent functions.
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 */
--
2.39.5