rts: Add casts to prevent compiler warnings in printfs.
authorErik de Castro Lopo <erikd@mega-nerd.com>
Sat, 26 Oct 2013 00:11:54 +0000 (11:11 +1100)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Mon, 28 Oct 2013 03:30:18 +0000 (14:30 +1100)
rts/Stats.c
rts/sm/Sanity.c

index c19f23c..7db4563 100644 (file)
@@ -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 */
index 0d48ba2..c653331 100644 (file)
@@ -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);
       }
   }