]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Sort out the remaining format string vs argument types mismatches.
authorJoerg Sonnenberger <joerg.sonnenberger@gmail.com>
Thu, 25 Feb 2010 16:16:36 +0000 (11:16 -0500)
committerJoerg Sonnenberger <joerg.sonnenberger@gmail.com>
Thu, 25 Feb 2010 16:16:36 +0000 (11:16 -0500)
SVN-Revision: 1988

libarchive/archive_write_set_format_ar.c
libarchive/archive_write_set_format_iso9660.c
libarchive/archive_write_set_format_mtree.c
libarchive/archive_write_set_format_shar.c
libarchive/archive_write_set_format_ustar.c

index 00c9c7b8727ce9f00e70ca8116b6c1242da5f0ff..3e70f363f80f43bd799a3e97bb1e00039c383df6 100644 (file)
@@ -445,8 +445,8 @@ archive_write_ar_finish_entry(struct archive_write *a)
 
        if (ar->entry_padding != 1) {
                archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
-                   "Padding wrong size: %d should be 1 or 0",
-                   ar->entry_padding);
+                   "Padding wrong size: %ju should be 1 or 0",
+                   (uintmax_t)ar->entry_padding);
                return (ARCHIVE_WARN);
        }
 
index fe2d1c96db6ea173c0d7559234b295dbd06116c9..75e25125da61fd17b68ed71f0ef54c0e43ea7f3e 100644 (file)
@@ -1298,7 +1298,7 @@ get_str_opt(struct archive_write *a, struct archive_string *s,
 
        if (strlen(value) > maxsize) {
                archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
-                   "Value is longer than %d characters "
+                   "Value is longer than %zu characters "
                    "for option ``%s''", maxsize, key);
                return (ARCHIVE_FATAL);
        }
index 988a7baa65fe1caaeb1c358bfdc4996a70da9e04..054cbc14318806a79c6414e17eeda05a24b51346 100644 (file)
@@ -718,9 +718,9 @@ archive_write_mtree_finish_entry(struct archive_write *a)
                        archive_strcat(str, " type=char");
                if ((keys & F_DEV) != 0) {
                        archive_string_sprintf(str,
-                           " device=native,%d,%d",
-                           archive_entry_rdevmajor(entry),
-                           archive_entry_rdevminor(entry));
+                           " device=native,%ju,%ju",
+                           (uintmax_t)archive_entry_rdevmajor(entry),
+                           (uintmax_t)archive_entry_rdevminor(entry));
                }
                break;
        case AE_IFBLK:
@@ -728,9 +728,9 @@ archive_write_mtree_finish_entry(struct archive_write *a)
                        archive_strcat(str, " type=block");
                if ((keys & F_DEV) != 0) {
                        archive_string_sprintf(str,
-                           " device=native,%d,%d",
-                           archive_entry_rdevmajor(entry),
-                           archive_entry_rdevminor(entry));
+                           " device=native,%ju,%ju",
+                           (uintmax_t)archive_entry_rdevmajor(entry),
+                           (uintmax_t)archive_entry_rdevminor(entry));
                }
                break;
        case AE_IFDIR:
index 0348b4eb0a34691a684b88c489a398796d0e0509..727a6e40115ac3ac01053218d739cadf84826ea0 100644 (file)
@@ -308,15 +308,15 @@ archive_write_shar_header(struct archive_write *a, struct archive_entry *entry)
                        break;
                case AE_IFCHR:
                        archive_string_sprintf(&shar->work,
-                           "mknod %s c %d %d\n", shar->quoted_name.s,
-                           archive_entry_rdevmajor(entry),
-                           archive_entry_rdevminor(entry));
+                           "mknod %s c %ju %ju\n", shar->quoted_name.s,
+                           (uintmax_t)archive_entry_rdevmajor(entry),
+                           (uintmax_t)archive_entry_rdevminor(entry));
                        break;
                case AE_IFBLK:
                        archive_string_sprintf(&shar->work,
-                           "mknod %s b %d %d\n", shar->quoted_name.s,
-                           archive_entry_rdevmajor(entry),
-                           archive_entry_rdevminor(entry));
+                           "mknod %s b %ju %ju\n", shar->quoted_name.s,
+                           (uintmax_t)archive_entry_rdevmajor(entry),
+                           (uintmax_t)archive_entry_rdevminor(entry));
                        break;
                default:
                        return (ARCHIVE_WARN);
@@ -537,8 +537,7 @@ archive_write_shar_finish_entry(struct archive_write *a)
                }
 
                if ((p = archive_entry_fflags_text(shar->entry)) != NULL) {
-                       archive_string_sprintf(&shar->work, "chflags %s ",
-                           p, archive_entry_pathname(shar->entry));
+                       archive_string_sprintf(&shar->work, "chflags %s ", p);
                        shar_quote(&shar->work,
                            archive_entry_pathname(shar->entry), 1);
                        archive_strcat(&shar->work, "\n");
index 5bd038ee25fe13e7710fa18f8481612924e96e9b..a76081ce1d6c46be82addb9fed9ce76e21c86ff4 100644 (file)
@@ -168,7 +168,7 @@ archive_write_set_format_ustar(struct archive *_a)
 
        /* Basic internal sanity test. */
        if (sizeof(template_header) != 512) {
-               archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "Internal: template_header wrong size: %d should be 512", sizeof(template_header));
+               archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "Internal: template_header wrong size: %zu should be 512", sizeof(template_header));
                return (ARCHIVE_FATAL);
        }