fts: fix compilation errors with fts_cross_check()
authorPádraig Brady <P@draigBrady.com>
Thu, 20 Jul 2023 14:08:27 +0000 (15:08 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 28 Jul 2023 20:19:07 +0000 (22:19 +0200)
* lib/fts.c: Fix printf format chars.
* lib/fts_.h: Provide a declaration for users.

ChangeLog
lib/fts.c
lib/fts_.h

index 9f99fed0df4f26c75e7a7ac4cd535e86e4170bf1..2e0c8926f9d0c4e33c6c2069fa392246aaaeb3b4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-07-20  Pádraig Brady  <P@draigBrady.com>
+
+       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  <bruno@clisp.org>
 
        wcsnrtombs: Fix file list.
index 31de00e9c05897a4992bdabbc28836c11837bda4..2c7b542eee226cf76939de99a47c38e8707c6eb4 100644 (file)
--- 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;
index 6de50bf6920ff27db47f338ddfd81454211afd93..aceeb961175a21a5cae933fbc3eec47d16a5ea91 100644 (file)
@@ -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 */