From db54c8a077d84caf93d55a33057158c2ca4034f3 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 9f99fed0df..2e0c8926f9 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
wcsnrtombs: Fix file list.
diff --git a/lib/fts.c b/lib/fts.c
index 31de00e9c0..2c7b542eee 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 6de50bf692..aceeb96117 100644
--- a/lib/fts_.h
+++ b/lib/fts_.h
@@ -266,6 +266,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