[PATCH] fts: Pacify -Wuseless-cast warnings when GNULIB_FTS_DEBUG is defined.

Collin Funk <[email protected]>
Newsgroups gmane.comp.lib.gnulib.bugs
Message-ID <e58caabb1f4aa9fde7cce13704f994e5848c1883.1786299854.git.collin.funk1@gmail.com>
* lib/fts.c (find_matching_ancestor): Pacify -Wuseless-cast via compound
literals.
---
 ChangeLog | 6 ++++++
 lib/fts.c | 8 ++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 93089fa867..beaeff585c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2026-08-09  Collin Funk  <[email protected]>
+
+	fts: Pacify -Wuseless-cast warnings when GNULIB_FTS_DEBUG is defined.
+	* lib/fts.c (find_matching_ancestor): Pacify -Wuseless-cast via compound
+	literals.
+
 2026-08-09  Bruno Haible  <[email protected]>
 
 	bootstrap: Fix error "client sha256; server sha1" seen by some users.
diff --git a/lib/fts.c b/lib/fts.c
index 98851cdaf1..d7265ed292 100644
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -1662,11 +1662,11 @@ find_matching_ancestor (FTSENT const *e_curr, struct Active_dir const *ad)
        ent = ent->fts_parent)
     printf ("  %s(%"PRIuMAX"/%"PRIuMAX") to %s(%"PRIuMAX"/%"PRIuMAX")...\n",
             ad->fts_ent->fts_accpath,
-            (uintmax_t) ad->dev,
-            (uintmax_t) ad->ino,
+            (uintmax_t) {ad->dev},
+            (uintmax_t) {ad->ino},
             ent->fts_accpath,
-            (uintmax_t) ent->fts_statp->st_dev,
-            (uintmax_t) ent->fts_statp->st_ino);
+            (uintmax_t) {ent->fts_statp->st_dev},
+            (uintmax_t) {ent->fts_statp->st_ino});
 }
 
 void
-- 
2.55.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.