1From 7770f53d7d46a5dee46478caa4d0bda8d7cf9b9c Mon Sep 17 00:00:00 2001
2From: Michael Forney <mforney@mforney.org>
3Date: Thu, 4 Jun 2020 21:36:11 -0700
4Subject: [PATCH] pax: Fix some incorrect format specifiers
5
6---
7 bin/pax/cpio.c | 2 +-
8 bin/pax/gen_subs.c | 4 ++--
9 2 files changed, 3 insertions(+), 3 deletions(-)
10
11diff --git a/bin/pax/cpio.c b/bin/pax/cpio.c
12index fbcf032e091..1242ad0d8a7 100644
13--- a/bin/pax/cpio.c
14+++ b/bin/pax/cpio.c
15@@ -214,7 +214,7 @@ rd_ln_nm(ARCHD *arcn)
16 */
17 if ((arcn->sb.st_size <= 0) ||
18 (arcn->sb.st_size >= (off_t)sizeof(arcn->ln_name))) {
19- paxwarn(1, "Cpio link name length is invalid: %lld",
20+ paxwarn(1, "Cpio link name length is invalid: %zu",
21 arcn->sb.st_size);
22 return(-1);
23 }
24diff --git a/bin/pax/gen_subs.c b/bin/pax/gen_subs.c
25index 928cfcd3657..897a688327e 100644
26--- a/bin/pax/gen_subs.c
27+++ b/bin/pax/gen_subs.c
28@@ -112,7 +112,7 @@ ls_list(ARCHD *arcn, time_t now, FILE *fp)
29 else if (strftime(f_date, sizeof(f_date), TIMEFMT(sbp->st_mtime, now),
30 tm) == 0)
31 f_date[0] = '\0';
32- (void)fprintf(fp, "%s%2u %-*.*s %-*.*s ", f_mode, sbp->st_nlink,
33+ (void)fprintf(fp, "%s%2u %-*.*s %-*.*s ", f_mode, (unsigned)sbp->st_nlink,
34 NAME_WIDTH, UT_NAMESIZE, user_from_uid(sbp->st_uid, 0),
35 NAME_WIDTH, UT_NAMESIZE, group_from_gid(sbp->st_gid, 0));
36
37@@ -124,7 +124,7 @@ ls_list(ARCHD *arcn, time_t now, FILE *fp)
38 (unsigned long)MAJOR(sbp->st_rdev),
39 (unsigned long)MINOR(sbp->st_rdev));
40 else {
41- (void)fprintf(fp, "%9llu ", sbp->st_size);
42+ (void)fprintf(fp, "%9zu ", sbp->st_size);
43 }
44
45 /*
46--
472.49.0
48