Permalink
Browse files

test: fix 'long long' format warnings

  • Loading branch information...
1 parent 4361320 commit 77d926153b335a59a55292d81c67e1b339c38443 @bnoordhuis bnoordhuis committed Dec 27, 2012
Showing with 9 additions and 12 deletions.
  1. +3 −3 test/test-get-memory.c
  2. +6 −9 test/test-platform-output.c
View
@@ -26,9 +26,9 @@ TEST_IMPL(get_memory) {
uint64_t free_mem = uv_get_free_memory();
uint64_t total_mem = uv_get_total_memory();
- printf("free_mem=%llu, total_mem=%llu\n",
- (unsigned long long) free_mem,
- (unsigned long long) total_mem);
+ printf("free_mem=%lu, total_mem=%lu\n",
+ (unsigned long) free_mem,
+ (unsigned long) total_mem);
ASSERT(free_mem > 0);
ASSERT(total_mem > 0);
@@ -40,7 +40,7 @@ TEST_IMPL(platform_output) {
err = uv_resident_set_memory(&rss);
ASSERT(UV_OK == err.code);
- printf("uv_resident_set_memory: %llu\n", (unsigned long long) rss);
+ printf("uv_resident_set_memory: %lu\n", (unsigned long) rss);
err = uv_uptime(&uptime);
ASSERT(UV_OK == err.code);
@@ -54,14 +54,11 @@ TEST_IMPL(platform_output) {
for (i = 0; i < count; i++) {
printf(" model: %s\n", cpus[i].model);
printf(" speed: %d\n", cpus[i].speed);
- printf(" times.sys: %llu\n", (unsigned long long) cpus[i].cpu_times.sys);
- printf(" times.user: %llu\n",
- (unsigned long long) cpus[i].cpu_times.user);
- printf(" times.idle: %llu\n",
- (unsigned long long) cpus[i].cpu_times.idle);
- printf(" times.irq: %llu\n", (unsigned long long) cpus[i].cpu_times.irq);
- printf(" times.nice: %llu\n",
- (unsigned long long) cpus[i].cpu_times.nice);
+ printf(" times.sys: %lu\n", (unsigned long) cpus[i].cpu_times.sys);
+ printf(" times.user: %lu\n", (unsigned long) cpus[i].cpu_times.user);
+ printf(" times.idle: %lu\n", (unsigned long) cpus[i].cpu_times.idle);
+ printf(" times.irq: %lu\n", (unsigned long) cpus[i].cpu_times.irq);
+ printf(" times.nice: %lu\n", (unsigned long) cpus[i].cpu_times.nice);
}
uv_free_cpu_info(cpus, count);

0 comments on commit 77d9261

Please sign in to comment.