test: fix -Wformat warnings in platform test

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 <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
This commit is contained in:
Ben Noordhuis 2016-04-29 17:22:14 +02:00
parent 4844c75de8
commit 2753bc1fc8

View File

@ -70,8 +70,9 @@ TEST_IMPL(platform_output) {
printf(" system: %llu sec %llu microsec\n", printf(" system: %llu sec %llu microsec\n",
(unsigned long long) rusage.ru_stime.tv_sec, (unsigned long long) rusage.ru_stime.tv_sec,
(unsigned long long) rusage.ru_stime.tv_usec); (unsigned long long) rusage.ru_stime.tv_usec);
printf(" page faults: %llu\n", rusage.ru_majflt); printf(" page faults: %llu\n", (unsigned long long) rusage.ru_majflt);
printf(" maximum resident set size: %llu\n", rusage.ru_maxrss); printf(" maximum resident set size: %llu\n",
(unsigned long long) rusage.ru_maxrss);
err = uv_cpu_info(&cpus, &count); err = uv_cpu_info(&cpus, &count);
ASSERT(err == 0); ASSERT(err == 0);