logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

0030-pax-Fix-some-incorrect-format-specifiers.patch (1597B)


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