gid = (int)from_octal(e + 30, 6);
assertEqualMem(e + 36, "000001", 6); /* nlink */
failure("file entries should not have rdev set (dev field was 0%o)",
- dev);
+ (unsigned int)dev);
assertEqualMem(e + 42, "000000", 6); /* rdev */
t = from_octal(e + 48, 11); /* mtime */
assert(t <= now); /* File wasn't created in future. */
*extra_data_size -= hash_size;
} else {
archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
- "Unsupported hash type (0x%x)", (int) hash_type);
+ "Unsupported hash type (0x%jx)", (uintmax_t)hash_type);
return ARCHIVE_FATAL;
}
} else {
/* Unknown host OS */
archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
- "Unsupported Host OS: 0x%x", (int) host_os);
+ "Unsupported Host OS: 0x%jx",
+ (uintmax_t)host_os);
return ARCHIVE_FATAL;
}
default:
archive_set_error(&a->archive,
ARCHIVE_ERRNO_FILE_FORMAT,
- "Unsupported extra type (0x%x)",
- (int) extra_field_id);
+ "Unsupported extra type (0x%jx)",
+ (uintmax_t)extra_field_id);
return ARCHIVE_FATAL;
}
char *buff2;
size_t buff2_size = 0x13000;
char buff3[1024];
- long i;
+ unsigned long i;
assert((buff2 = malloc(buff2_size)) != NULL);
/* Repeat the following for a variety of odd blocksizes. */
char *buff2;
size_t buff2_size = 0x11000;
char buff3[1024];
- long i;
+ unsigned long i;
assert((buff2 = malloc(buff2_size)) != NULL);
/* Create a new archive in memory. */
* This string should appear in the verbose listing regardless of platform,
* locale, username, or groupname.
*/
-const char * tvf_contains = "l link to f";
+static const char * tvf_contains = "l link to f";
DEFINE_TEST(test_stdio)
{
if (v1 == v2)
return (1);
failure_start(file, line, "%s != %s", e1, e2);
- logprintf(" %s=%lld (0x%llx, 0%llo)\n", e1, v1, v1, v1);
- logprintf(" %s=%lld (0x%llx, 0%llo)\n", e2, v2, v2, v2);
+ logprintf(" %s=%lld (0x%llx, 0%llo)\n", e1, v1,
+ (unsigned long long)v1, (unsigned long long)v1);
+ logprintf(" %s=%lld (0x%llx, 0%llo)\n", e2, v2,
+ (unsigned long long)v2, (unsigned long long)v2);
failure_finish(extra);
return (0);
}
for (j = 0; j < 16 && i + j < l; j++) {
if (ref != NULL && p[i + j] != ref[i + j])
sep = '_';
- logprintf("%c%02x", sep, 0xff & (int)p[i+j]);
+ logprintf("%c%02x", sep, 0xff & (unsigned int)p[i+j]);
if (ref != NULL && p[i + j] == ref[i + j])
sep = ' ';
}