minor printf format fixes

This commit is contained in:
drochner 2011-07-12 18:19:13 +00:00
parent b21c832176
commit ee65e1cf6e
5 changed files with 8 additions and 8 deletions

View File

@ -719,7 +719,8 @@ __LA_DECL const char *archive_format_name(struct archive *);
__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 *);

View File

@ -919,7 +919,7 @@ read_children(struct archive_read *a, struct file_info *parent)
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 @@ archive_read_format_iso9660_read_header(struct archive_read *a,
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 @@ archive_read_format_iso9660_read_header(struct archive_read *a,
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);

View File

@ -1729,7 +1729,6 @@ create_dir(struct archive_write_disk *a, char *path)
}
if (unlink(path) != 0) {
archive_set_error(&a->archive, errno,
"Can't create directory '%s': "
"Conflicting file cannot be removed");
return (ARCHIVE_FAILED);
}

View File

@ -439,8 +439,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: %lld should be 1 or 0",
(long long)ar->entry_padding);
return (ARCHIVE_WARN);
}

View 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: %zd should be 512", sizeof(template_header));
return (ARCHIVE_FATAL);
}