Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/libarchive/dist/libarchive minor printf format ...



details:   https://anonhg.NetBSD.org/src/rev/4be3b3fbaf11
branches:  trunk
changeset: 767234:4be3b3fbaf11
user:      drochner <drochner%NetBSD.org@localhost>
date:      Tue Jul 12 18:19:13 2011 +0000

description:
minor printf format fixes

diffstat:

 external/bsd/libarchive/dist/libarchive/archive.h                             |  3 ++-
 external/bsd/libarchive/dist/libarchive/archive_read_support_format_iso9660.c |  6 +++---
 external/bsd/libarchive/dist/libarchive/archive_write_disk.c                  |  1 -
 external/bsd/libarchive/dist/libarchive/archive_write_set_format_ar.c         |  4 ++--
 external/bsd/libarchive/dist/libarchive/archive_write_set_format_ustar.c      |  2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)

diffs (80 lines):

diff -r 71449810f93d -r 4be3b3fbaf11 external/bsd/libarchive/dist/libarchive/archive.h
--- a/external/bsd/libarchive/dist/libarchive/archive.h Tue Jul 12 16:59:48 2011 +0000
+++ b/external/bsd/libarchive/dist/libarchive/archive.h Tue Jul 12 18:19:13 2011 +0000
@@ -719,7 +719,8 @@
 __LA_DECL int           archive_format(struct archive *);
 __LA_DECL void          archive_clear_error(struct archive *);
 __LA_DECL void          archive_set_error(struct archive *, int _err,
-                           const char *fmt, ...);
+                           const char *fmt, ...)
+                        __attribute__((__format__(__printf__,3,4)));
 __LA_DECL void          archive_copy_error(struct archive *dest,
                            struct archive *src);
 __LA_DECL int           archive_file_count(struct archive *);
diff -r 71449810f93d -r 4be3b3fbaf11 external/bsd/libarchive/dist/libarchive/archive_read_support_format_iso9660.c
--- a/external/bsd/libarchive/dist/libarchive/archive_read_support_format_iso9660.c     Tue Jul 12 16:59:48 2011 +0000
+++ b/external/bsd/libarchive/dist/libarchive/archive_read_support_format_iso9660.c     Tue Jul 12 18:19:13 2011 +0000
@@ -919,7 +919,7 @@
        if (parent->offset + parent->size > iso9660->volume_size) {
                archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
                    "Directory is beyond end-of-media: %s",
-                   parent->name);
+                   parent->name.s);
                return (ARCHIVE_WARN);
        }
        if (iso9660->current_position < parent->offset) {
@@ -1215,7 +1215,7 @@
 
        if (file->offset + file->size > iso9660->volume_size) {
                archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
-                   "File is beyond end-of-media: %s", file->name);
+                   "File is beyond end-of-media: %s", file->name.s);
                iso9660->entry_bytes_remaining = 0;
                iso9660->entry_sparse_offset = 0;
                return (ARCHIVE_WARN);
@@ -1274,7 +1274,7 @@
        if ((file->mode & AE_IFMT) != AE_IFDIR &&
            file->offset < iso9660->current_position) {
                archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
-                   "Ignoring out-of-order file @%x (%s) %jd < %jd",
+                   "Ignoring out-of-order file @%p (%s) %jd < %jd",
                    file,
                    iso9660->pathname.s,
                    file->offset, iso9660->current_position);
diff -r 71449810f93d -r 4be3b3fbaf11 external/bsd/libarchive/dist/libarchive/archive_write_disk.c
--- a/external/bsd/libarchive/dist/libarchive/archive_write_disk.c      Tue Jul 12 16:59:48 2011 +0000
+++ b/external/bsd/libarchive/dist/libarchive/archive_write_disk.c      Tue Jul 12 18:19:13 2011 +0000
@@ -1729,7 +1729,6 @@
                }
                if (unlink(path) != 0) {
                        archive_set_error(&a->archive, errno,
-                           "Can't create directory '%s': "
                            "Conflicting file cannot be removed");
                        return (ARCHIVE_FAILED);
                }
diff -r 71449810f93d -r 4be3b3fbaf11 external/bsd/libarchive/dist/libarchive/archive_write_set_format_ar.c
--- a/external/bsd/libarchive/dist/libarchive/archive_write_set_format_ar.c     Tue Jul 12 16:59:48 2011 +0000
+++ b/external/bsd/libarchive/dist/libarchive/archive_write_set_format_ar.c     Tue Jul 12 18:19:13 2011 +0000
@@ -439,8 +439,8 @@
 
        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: %lld should be 1 or 0",
+                   (long long)ar->entry_padding);
                return (ARCHIVE_WARN);
        }
 
diff -r 71449810f93d -r 4be3b3fbaf11 external/bsd/libarchive/dist/libarchive/archive_write_set_format_ustar.c
--- a/external/bsd/libarchive/dist/libarchive/archive_write_set_format_ustar.c  Tue Jul 12 16:59:48 2011 +0000
+++ b/external/bsd/libarchive/dist/libarchive/archive_write_set_format_ustar.c  Tue Jul 12 18:19:13 2011 +0000
@@ -168,7 +168,7 @@
 
        /* 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: %zd should be 512", sizeof(template_header));
                return (ARCHIVE_FATAL);
        }
 



Home | Main Index | Thread Index | Old Index