Fix format patterns for 64-bit compilation

This commit is contained in:
Jeremy Lakeman 2013-10-14 14:45:43 +10:30
parent b8ec568711
commit c7fa395968
3 changed files with 4 additions and 4 deletions

View File

@ -103,7 +103,7 @@ int rhizome_bundle_import_files(rhizome_manifest *m, const char *manifest_path,
if (ret==0){
buffer_len = read_uint16(marker);
if (buffer_len < 1 || buffer_len > MAX_MANIFEST_BYTES)
ret=WHYF("Invalid manifest length %d", buffer_len);
ret=WHYF("Invalid manifest length %zd", buffer_len);
}
if (ret==0){

View File

@ -93,7 +93,7 @@ ssize_t read_whole_file(const char *path, unsigned char *buffer, size_t buffer_s
return WHYF_perror("open(%s,O_RDONLY)", alloca_str_toprint(path));
ssize_t ret = read(fd, buffer, buffer_size);
if (ret == -1)
ret = WHYF_perror("read(%s,%u)", alloca_str_toprint(path), buffer_size);
ret = WHYF_perror("read(%s,%zu)", alloca_str_toprint(path), buffer_size);
if (close(fd) == -1)
ret = WHY_perror("close");
return ret;
@ -367,7 +367,7 @@ int rhizome_hash_file(rhizome_manifest *m, const char *path, rhizome_filehash_t
ssize_t r;
while ((r = read(fd, buffer, sizeof buffer))) {
if (r == -1) {
WHYF_perror("read(%s,%u)", alloca_str_toprint(path), sizeof buffer);
WHYF_perror("read(%s,%zu)", alloca_str_toprint(path), sizeof buffer);
close(fd);
return -1;
}

View File

@ -686,7 +686,7 @@ int _sqlite_vbind(struct __sourceloc __whence, int log_level, sqlite_retry_state
} else {
char hash_hex[RHIZOME_FILEHASH_STRLEN];
tohex(hash_hex, sizeof hash_hex, hashp->binary);
BIND_DEBUG(RHIZOME_FILEHASH_T, sqlite3_bind_text, "%s,%d,SQLITE_TRANSIENT", hash_hex, sizeof hash_hex);
BIND_DEBUG(RHIZOME_FILEHASH_T, sqlite3_bind_text, "%s,%zd,SQLITE_TRANSIENT", hash_hex, sizeof hash_hex);
BIND_RETRY(sqlite3_bind_text, hash_hex, sizeof hash_hex, SQLITE_TRANSIENT);
}
}