Ticket #8580: 0001-Fix-compiler-warnings-due-to-integer-size-mismatch.patch

File 0001-Fix-compiler-warnings-due-to-integer-size-mismatch.patch, 1.3 KB (added by heatsink, 15 months ago)
  • rts/Stats.c

    From e677388ea708f423e093f5fede7e0a3f3faeddfc Mon Sep 17 00:00:00 2001
    From: Christopher Rodrigues <[email protected]>
    Date: Sat, 30 Nov 2013 13:06:43 -0600
    Subject: [PATCH] Fix compiler warnings due to integer size mismatch
    
    ---
     rts/Stats.c | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/rts/Stats.c b/rts/Stats.c
    index 7db4563..48c320c 100644
    a b stat_exit (void) 
    691691            statsPrintf("%16s bytes maximum slop\n", temp); 
    692692 
    693693            statsPrintf("%16" FMT_SizeT " MB total memory in use (%" FMT_SizeT " MB lost due to fragmentation)\n\n",  
    694                         (W_)(peak_mblocks_allocated * MBLOCK_SIZE_W / (1024 * 1024 / sizeof(W_))), 
    695                         (W_)(peak_mblocks_allocated * BLOCKS_PER_MBLOCK * BLOCK_SIZE_W - hw_alloc_blocks * BLOCK_SIZE_W) / (1024 * 1024 / sizeof(W_))); 
     694                        (size_t)(peak_mblocks_allocated * MBLOCK_SIZE_W) / (1024 * 1024 / sizeof(W_)), 
     695                        (size_t)(peak_mblocks_allocated * BLOCKS_PER_MBLOCK * BLOCK_SIZE_W - hw_alloc_blocks * BLOCK_SIZE_W) / (1024 * 1024 / sizeof(W_))); 
    696696 
    697697            /* Print garbage collections in each gen */ 
    698698            statsPrintf("                                    Tot time (elapsed)  Avg pause  Max pause\n");