diff options
| author | Karel Zak <kzak@redhat.com> | 2021-11-26 19:45:29 +0100 |
|---|---|---|
| committer | Karel Zak <kzak@redhat.com> | 2021-11-26 19:45:29 +0100 |
| commit | 57d9fd2bea629f211bdd30a12cacc759c0b4f93b (patch) | |
| tree | f7c7f08f35114ad10e2e9921febb48dc3ff07b0b | |
| parent | 1b44d0923281173409c71aef551334e78820878d (diff) | |
| download | util-linux-57d9fd2bea629f211bdd30a12cacc759c0b4f93b.tar.gz | |
hardlink: fix compiler warning [-Wformat=]
misc-utils/hardlink.c:726:48: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type ‘__nlink_t’
Reported-by: Anatoly Pugachev <matorola@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
| -rw-r--r-- | misc-utils/hardlink.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/misc-utils/hardlink.c b/misc-utils/hardlink.c index 2abd6d6644..2aca5ad603 100644 --- a/misc-utils/hardlink.c +++ b/misc-utils/hardlink.c @@ -723,8 +723,9 @@ static int inserter(const char *fpath, const struct stat *sb, return 0; } - jlog(JLOG_VERBOSE2, " %5zu: [%ld/%ld/%ld] %s", - stats.files, sb->st_dev, sb->st_ino, sb->st_nlink, fpath); + jlog(JLOG_VERBOSE2, " %5zu: [%ld/%ld/%zu] %s", + stats.files, 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)) { jlog(JLOG_VERBOSE1, |
