summaryrefslogtreecommitdiff
path: root/src/journal/test-compress-benchmark.c
diff options
context:
space:
mode:
authorMarc-Antoine Perennou <Marc-Antoine@Perennou.com>2014-07-16 10:13:06 +0900
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-07-15 22:36:56 -0400
commitda2e1c71662c348d31f0fc39e42963283c550a28 (patch)
tree6eece1a59a57bc32360196e4983e1efa61a4a95e /src/journal/test-compress-benchmark.c
parent92b10cbccdeef3896f45dc340eb7779c78577ede (diff)
test-compress-benchmark: silence warnings
and btw make it pass for 32bits where size_t != uint64_t
Diffstat (limited to 'src/journal/test-compress-benchmark.c')
-rw-r--r--src/journal/test-compress-benchmark.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/journal/test-compress-benchmark.c b/src/journal/test-compress-benchmark.c
index 0a23bd1e13..a346447b4c 100644
--- a/src/journal/test-compress-benchmark.c
+++ b/src/journal/test-compress-benchmark.c
@@ -42,12 +42,12 @@ static char* make_buf(size_t count) {
static void test_compress_decompress(const char* label,
compress_t compress, decompress_t decompress) {
- usec_t n, n2;
+ usec_t n, n2 = 0;
float dt;
_cleanup_free_ char *text, *buf;
_cleanup_free_ void *buf2 = NULL;
- size_t buf2_allocated = 0;
+ uint64_t buf2_allocated = 0;
size_t skipped = 0, compressed = 0, total = 0;
text = make_buf(MAX_SIZE);
@@ -57,7 +57,7 @@ static void test_compress_decompress(const char* label,
n = now(CLOCK_MONOTONIC);
for (size_t i = 1; i <= MAX_SIZE; i += (i < 2048 ? 1 : 217)) {
- size_t j = 0, k = 0;
+ uint64_t j = 0, k = 0;
int r;
r = compress(text, i, buf, &j);
@@ -72,7 +72,7 @@ static void test_compress_decompress(const char* label,
assert(j > 0);
if (j >= i)
- log_error("%s \"compressed\" %zu -> %zu", label, i, j);
+ log_error("%s \"compressed\" %zu -> " PRIu64, label, i, j);
r = decompress(buf, j, &buf2, &buf2_allocated, &k, 0);
assert(r == 0);