From b754fdca72e9382edd457c0fd81de6e1b644d789 Mon Sep 17 00:00:00 2001 From: Chris Mumford Date: Mon, 30 Nov 2020 10:43:24 -0800 Subject: [PATCH] Fixed fprintf of 64-bit value. --- db/db_test.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/db/db_test.cc b/db/db_test.cc index 8cab018..5c364a3 100644 --- a/db/db_test.cc +++ b/db/db_test.cc @@ -5,6 +5,7 @@ #include "leveldb/db.h" #include +#include #include #include "gtest/gtest.h" @@ -2289,7 +2290,8 @@ static void BM_LogAndApply(benchmark::State& state) { char buf[16]; std::snprintf(buf, sizeof(buf), "%d", num_base_files); std::fprintf(stderr, - "BM_LogAndApply/%-6s %8zu iters : %9u us (%7.0f us / iter)\n", + "BM_LogAndApply/%-6s %8" PRIu64 + " iters : %9u us (%7.0f us / iter)\n", buf, state.iterations(), us, ((float)us) / state.iterations()); }