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);
}
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);
}
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:
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:
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);
}
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");
/* 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);
}