From 53e9bd0f9ea02c47510a47ab37901f2a284a3632 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 31 Dec 2020 19:28:54 +0100 Subject: Fix MinGW build --- test/hash_test.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'test/hash_test.c') diff --git a/test/hash_test.c b/test/hash_test.c index 46a8fd5..2b9bb51 100644 --- a/test/hash_test.c +++ b/test/hash_test.c @@ -20,6 +20,7 @@ #include "zix/digest.h" #include "zix/hash.h" +#include #include #include #include @@ -113,7 +114,9 @@ stress(void) // Ensure hash size is correct if (zix_hash_size(hash) != n_strings) { - return test_fail("Hash size %zu != %zu\n", zix_hash_size(hash), n_strings); + return test_fail("Hash size %" PRIuPTR " != %" PRIuPTR "\n", + zix_hash_size(hash), + n_strings); } // zix_hash_print_dot(hash, stdout); @@ -210,7 +213,7 @@ main(void) #ifdef ZIX_WITH_TEST_MALLOC const size_t total_n_allocs = test_malloc_get_n_allocs(); - printf("Testing 0 ... %zu failed allocations\n", total_n_allocs); + printf("Testing 0 ... %" PRIuPTR " failed allocations\n", total_n_allocs); expect_failure = true; for (size_t i = 0; i < total_n_allocs; ++i) { test_malloc_reset(i); -- cgit v1.2.1