From 7cb10ba40e619a0a368571ea8c7a85c1dd34628b Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo <erikd@mega-nerd.com> Date: Sat, 26 Oct 2013 11:11:54 +1100 Subject: [PATCH] rts: Add casts to prevent compiler warnings in printfs. --- rts/Stats.c | 2 +- rts/sm/Sanity.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rts/Stats.c b/rts/Stats.c index c19f23c59d16..7db4563377e8 100644 --- a/rts/Stats.c +++ b/rts/Stats.c @@ -691,7 +691,7 @@ stat_exit (void) statsPrintf("%16s bytes maximum slop\n", temp); statsPrintf("%16" FMT_SizeT " MB total memory in use (%" FMT_SizeT " MB lost due to fragmentation)\n\n", - peak_mblocks_allocated * MBLOCK_SIZE_W / (1024 * 1024 / sizeof(W_)), + (W_)(peak_mblocks_allocated * MBLOCK_SIZE_W / (1024 * 1024 / sizeof(W_))), (W_)(peak_mblocks_allocated * BLOCKS_PER_MBLOCK * BLOCK_SIZE_W - hw_alloc_blocks * BLOCK_SIZE_W) / (1024 * 1024 / sizeof(W_))); /* Print garbage collections in each gen */ diff --git a/rts/sm/Sanity.c b/rts/sm/Sanity.c index 0d48ba2724ff..c65333116477 100644 --- a/rts/sm/Sanity.c +++ b/rts/sm/Sanity.c @@ -917,7 +917,7 @@ memInventory (rtsBool show) live_blocks + free_blocks, MB(live_blocks+free_blocks)); if (leak) { debugBelch("\n in system : %5" FMT_Word " blocks (%" FMT_Word " MB)\n", - mblocks_allocated * BLOCKS_PER_MBLOCK, mblocks_allocated); + (W_)(mblocks_allocated * BLOCKS_PER_MBLOCK), mblocks_allocated); } } -- GitLab