else
strcpy(date, "invalid mtime");
- fprintf(out, "%s%3d %-8s %-8s %8s %12s %s",
+ fprintf(out, "%s%3u %-8s %-8s %8s %12s %s",
archive_entry_strmode(entry),
archive_entry_nlink(entry),
uname, gname, size, date,
if(order < 2 || restore_method > 2) {
archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
- "Invalid parameter set in PPMd8 stream (order=%" PRId32 ", "
- "restore=%" PRId32 ")", order, restore_method);
+ "Invalid parameter set in PPMd8 stream (order=%" PRIu32 ", "
+ "restore=%" PRIu32 ")", order, restore_method);
return (ARCHIVE_FAILED);
}
/* Allocate the memory needed to properly decompress the file. */
if(!__archive_ppmd8_functions.Ppmd8_Alloc(&zip->ppmd8, mem << 20)) {
archive_set_error(&a->archive, ENOMEM,
- "Unable to allocate memory for PPMd8 stream: %" PRId32 " bytes",
+ "Unable to allocate memory for PPMd8 stream: %" PRIu32 " bytes",
mem << 20);
return (ARCHIVE_FATAL);
}
/* Check original owner. */
assertEqualInt(0, stat("dir_owner", &st));
- failure("dir_owner: st.st_uid=%d", st.st_uid);
+ failure("dir_owner: st.st_uid=%jd", (intmax_t)st.st_uid);
assertEqualInt(st.st_uid, original_uid);
/* Shouldn't try to edit the owner when no overwrite option is set. */
assert((ae = archive_entry_new()) != NULL);
assertEqualIntA(a, ARCHIVE_OK, archive_write_finish_entry(a));
/* Make sure they're unchanged. */
assertEqualInt(0, stat("dir_owner", &st));
- failure("dir_owner: st.st_uid=%d", st.st_uid);
+ failure("dir_owner: st.st_uid=%jd", (intmax_t)st.st_uid);
assertEqualInt(st.st_uid, original_uid);
/* Write a regular file with SUID bit, but don't use _EXTRACT_PERM. */
assertEqualInt(0, stat("file_bad_owner", &st));
failure("file_bad_owner: st.st_mode=%o", st.st_mode);
assertEqualInt(st.st_mode & 07777, 0744);
- failure("file_bad_owner: st.st_uid=%d getuid()=%d",
- st.st_uid, getuid());
+ failure("file_bad_owner: st.st_uid=%jd getuid()=%jd",
+ (intmax_t)st.st_uid, (intmax_t)getuid());
/* The entry had getuid()+1, but because we're
* not root, we should not have been able to set that. */
assertEqualInt(st.st_uid, getuid());
}
if (!now)
time(&now);
- fprintf(out, "%s %d ",
+ fprintf(out, "%s %u ",
archive_entry_strmode(entry),
archive_entry_nlink(entry));
for (i = 0; i < sizeof(failed_lines)/sizeof(failed_lines[0]); i++) {
if (failed_lines[i].count > 1 && !failed_lines[i].skip)
- logprintf("%s:%d: Summary: Failed %d times\n",
+ logprintf("%s:%u: Summary: Failed %d times\n",
failed_filename, i, failed_lines[i].count);
}
/* Clear the failure history for the next file. */