]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
hardlink: avoid format string error for dev_t
authorThomas Weißschuh <thomas@t-8ch.de>
Sun, 12 Apr 2026 06:09:24 +0000 (08:09 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Sun, 12 Apr 2026 07:03:32 +0000 (09:03 +0200)
The real integer type of dev_t is unspecified.
Cast the value to make sure it matches the format specifier.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
misc-utils/hardlink.c

index 2c02e25d4f9fbcd14f81e3951da7926108c53fdb..95c518bf6f4f9a3c7cc6063a20a6d8d0c364227f 100644 (file)
@@ -881,7 +881,7 @@ static int inserter(const char *fpath, const struct stat *sb,
        }
 
        jlog(VERBOSE2, printf(" %5zu: [%" PRIu64 "/%" PRIu64 "/%zu] %s",
-                       stats.files, sb->st_dev, sb->st_ino,
+                       stats.files, (uint64_t)sb->st_dev, sb->st_ino,
                        (size_t) sb->st_nlink, fpath));
 
        if ((opts.max_size > 0) && ((uintmax_t) sb->st_size > opts.max_size)) {