break;
default:
archive_set_error(&a->archive, errno,
- "Can't set permissions to 0%o", (int)mode);
+ "Can't set permissions to 0%o",
+ (unsigned int)mode);
r = ARCHIVE_WARN;
}
}
if (r2 != 0) {
archive_set_error(&a->archive, errno,
- "Can't set permissions to 0%o", (int)mode);
+ "Can't set permissions to 0%o", (unsigned int)mode);
r = ARCHIVE_WARN;
}
}
assertion_count(file, line);
if (chmod(pathname, mode) == 0)
return (1);
- failure_start(file, line, "chmod(\"%s\", %4.o)", pathname, mode);
+ failure_start(file, line, "chmod(\"%s\", %4.o)", pathname,
+ (unsigned int)mode);
failure_finish(NULL);
return (0);
if (r == 0 && mode == expected_mode)
return (1);
failure_start(file, line, "File %s has mode %o, expected %o",
- pathname, mode, expected_mode);
+ pathname, (unsigned int)mode, (unsigned int)expected_mode);
#endif
failure_finish(NULL);
return (0);
/* TODO: Can we do better here? */
if (mode >= 0 && (mode_t)mode != (st.st_mode & 07777)) {
failure_start(file, line, "Dir %s has wrong mode", pathname);
- logprintf(" Expected: 0%3o\n", mode);
- logprintf(" Found: 0%3o\n", st.st_mode & 07777);
+ logprintf(" Expected: 0%3o\n", (unsigned int)mode);
+ logprintf(" Found: 0%3o\n", (unsigned int)st.st_mode & 07777);
failure_finish(NULL);
return (0);
}
/* TODO: Can we do better here? */
if (mode >= 0 && (mode_t)mode != (st.st_mode & 07777)) {
failure_start(file, line, "File %s has wrong mode", pathname);
- logprintf(" Expected: 0%3o\n", mode);
- logprintf(" Found: 0%3o\n", st.st_mode & 07777);
+ logprintf(" Expected: 0%3o\n", (unsigned int)mode);
+ logprintf(" Found: 0%3o\n", (unsigned int)st.st_mode & 07777);
failure_finish(NULL);
return (0);
}
if ((want_type & ARCHIVE_ENTRY_ACL_TYPE_ACCESS) != 0 &&
(mode_t)(mode & 0777) != (archive_entry_mode(ae) & 0777)) {
failure_start(file, line, "Mode (%02o) and entry mode (%02o) "
- "mismatch", mode, archive_entry_mode(ae));
+ "mismatch", (unsigned int)mode,
+ (unsigned int)archive_entry_mode(ae));
failure_finish(NULL);
ret = 1;
}