summaryrefslogtreecommitdiff
path: root/test/example.c
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2020-08-16 16:12:13 -0700
committerHans Kristian Rosbach <hk-github@circlestorm.org>2020-08-20 12:05:55 +0200
commit1a46fb9ee1b6926eb8635d32d7f7c1c023a79625 (patch)
treeaf3d0eff7f5f3441046033b93ac07bc0d534ee2f /test/example.c
parent7b590b36669e3b2f45040b0f8f9a5f03768b8549 (diff)
downloadProject-Tick-1a46fb9ee1b6926eb8635d32d7f7c1c023a79625.tar.gz
Project-Tick-1a46fb9ee1b6926eb8635d32d7f7c1c023a79625.zip
Fix testsuite warnings on Windows, using PRIu64
zlib-ng already counts on inttypes.h and stdint.h, so use those to avoid printf-related warnings by casting integer fields whose size may vary to uint64_t and printing them that way.
Diffstat (limited to 'test/example.c')
-rw-r--r--test/example.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/example.c b/test/example.c
index c744fe71ec..70969f46e5 100644
--- a/test/example.c
+++ b/test/example.c
@@ -16,6 +16,7 @@
#include <string.h>
#include <stdlib.h>
#include <inttypes.h>
+#include <stdint.h>
#define TESTFILE "foo.gz"
@@ -452,7 +453,7 @@ void test_large_inflate(unsigned char *compr, size_t comprLen, unsigned char *un
CHECK_ERR(err, "inflateEnd");
if (d_stream.total_out != 2*uncomprLen + diff) {
- fprintf(stderr, "bad large inflate: %zu\n", d_stream.total_out);
+ fprintf(stderr, "bad large inflate: %" PRIu64 "\n", (uint64_t)d_stream.total_out);
exit(1);
} else {
printf("large_inflate(): OK\n");