From 2753bc1fc88843a7c1cad37e8bf12572ac03c3e8 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 29 Apr 2016 17:22:14 +0200 Subject: [PATCH] test: fix -Wformat warnings in platform test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cast the `ru_majflt` and `ru_maxrss` field to `unsigned long long` when printing them with `"%llu"`. Warnings introduced in commit 6f17a61 ("win: add maxrss, pagefaults to uv_getrusage()".) PR-URL: https://github.com/libuv/libuv/pull/855 Reviewed-By: Colin Ihrig Reviewed-By: Saúl Ibarra Corretgé --- test/test-platform-output.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/test-platform-output.c b/test/test-platform-output.c index 4d43b438..bd61454f 100644 --- a/test/test-platform-output.c +++ b/test/test-platform-output.c @@ -70,8 +70,9 @@ TEST_IMPL(platform_output) { printf(" system: %llu sec %llu microsec\n", (unsigned long long) rusage.ru_stime.tv_sec, (unsigned long long) rusage.ru_stime.tv_usec); - printf(" page faults: %llu\n", rusage.ru_majflt); - printf(" maximum resident set size: %llu\n", rusage.ru_maxrss); + printf(" page faults: %llu\n", (unsigned long long) rusage.ru_majflt); + printf(" maximum resident set size: %llu\n", + (unsigned long long) rusage.ru_maxrss); err = uv_cpu_info(&cpus, &count); ASSERT(err == 0);