Commit e93f8431 authored by Rusty Russell's avatar Rusty Russell

tdb: 64-bit fixes.

parent 65c7607d
......@@ -19,7 +19,7 @@
#include <ccan/tally/tally.h>
#define SUMMARY_FORMAT \
"Size of file/data: %zu/%zu\n" \
"Size of file/data: %u/%zu\n" \
"Number of records: %zu\n" \
"Smallest/average/largest keys: %zu/%zu/%zu\n%s" \
"Smallest/average/largest data: %zu/%zu/%zu\n%s" \
......
......@@ -72,7 +72,7 @@ typedef uint32_t tdb_len_t;
typedef uint32_t tdb_off_t;
#ifndef offsetof
#define offsetof(t,f) ((unsigned int)&((t *)0)->f)
#define offsetof(t,f) ((size_t)&((t *)0)->f)
#endif
#define TDB_MAGIC_FOOD "TDB file\n"
......
......@@ -25,7 +25,7 @@ static void taplog(struct tdb_context *tdb,
/* Strip trailing \n: diag adds it. */
if (line[0] && line[strlen(line)-1] == '\n')
diag("%s%.*s", log_prefix, strlen(line)-1, line);
diag("%s%.*s", log_prefix, (unsigned)strlen(line)-1, line);
else
diag("%s%s", log_prefix, line);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment