From c427ecd63267946d66cf15808ed507d4f94c3566 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 11 Oct 2020 19:57:20 +0200 Subject: [PATCH] Use the PRId64 #define for formatting int64. --- plocate.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plocate.cpp b/plocate.cpp index 66dfa91..a76c288 100644 --- a/plocate.cpp +++ b/plocate.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -432,7 +433,7 @@ void do_search_file(const vector &needles, const char *filename) // work for fairly unclear gain.) uint64_t matched = scan_all_docids(needles, fd, corpus, &engine); if (only_count) { - printf("%zu\n", matched); + printf("%" PRId64 "\n", matched); } return; } @@ -552,11 +553,11 @@ void do_search_file(const vector &needles, const char *filename) 1e3 * duration(steady_clock::now() - start).count()); uint64_t matched = scan_docids(needles, cur_candidates, corpus, &engine); - dprintf("Done in %.1f ms, found %zu matches.\n", + dprintf("Done in %.1f ms, found %" PRId64 " matches.\n", 1e3 * duration(steady_clock::now() - start).count(), matched); if (only_count) { - printf("%zu\n", matched); + printf("%" PRId64 "\n", matched); } } -- 2.39.2