mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-19 05:07:56 +00:00
Fix format patterns for 64-bit compilation
This commit is contained in:
parent
b8ec568711
commit
c7fa395968
@ -103,7 +103,7 @@ int rhizome_bundle_import_files(rhizome_manifest *m, const char *manifest_path,
|
|||||||
if (ret==0){
|
if (ret==0){
|
||||||
buffer_len = read_uint16(marker);
|
buffer_len = read_uint16(marker);
|
||||||
if (buffer_len < 1 || buffer_len > MAX_MANIFEST_BYTES)
|
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){
|
if (ret==0){
|
||||||
|
@ -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));
|
return WHYF_perror("open(%s,O_RDONLY)", alloca_str_toprint(path));
|
||||||
ssize_t ret = read(fd, buffer, buffer_size);
|
ssize_t ret = read(fd, buffer, buffer_size);
|
||||||
if (ret == -1)
|
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)
|
if (close(fd) == -1)
|
||||||
ret = WHY_perror("close");
|
ret = WHY_perror("close");
|
||||||
return ret;
|
return ret;
|
||||||
@ -367,7 +367,7 @@ int rhizome_hash_file(rhizome_manifest *m, const char *path, rhizome_filehash_t
|
|||||||
ssize_t r;
|
ssize_t r;
|
||||||
while ((r = read(fd, buffer, sizeof buffer))) {
|
while ((r = read(fd, buffer, sizeof buffer))) {
|
||||||
if (r == -1) {
|
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);
|
close(fd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -686,7 +686,7 @@ int _sqlite_vbind(struct __sourceloc __whence, int log_level, sqlite_retry_state
|
|||||||
} else {
|
} else {
|
||||||
char hash_hex[RHIZOME_FILEHASH_STRLEN];
|
char hash_hex[RHIZOME_FILEHASH_STRLEN];
|
||||||
tohex(hash_hex, sizeof hash_hex, hashp->binary);
|
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);
|
BIND_RETRY(sqlite3_bind_text, hash_hex, sizeof hash_hex, SQLITE_TRANSIENT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user