fix gcc warnings for printf formats on 32-bit
authorSimon Marlow <marlowsd@gmail.com>
Wed, 18 Jun 2008 09:40:18 +0000 (09:40 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Wed, 18 Jun 2008 09:40:18 +0000 (09:40 +0000)
rts/sm/GCUtils.c
rts/sm/Sweep.c

index 9230eb8..4432ad6 100644 (file)
@@ -179,7 +179,8 @@ todo_block_full (nat size, step_workspace *ws)
             step *stp;
             stp = ws->step;
             trace(TRACE_gc|DEBUG_gc, "push todo block %p (%ld words), step %d, n_todos: %d", 
             step *stp;
             stp = ws->step;
             trace(TRACE_gc|DEBUG_gc, "push todo block %p (%ld words), step %d, n_todos: %d", 
-                  bd->start, bd->free - bd->u.scan, stp->abs_no, stp->n_todos);
+                  bd->start, (unsigned long)(bd->free - bd->u.scan),
+                  stp->abs_no, stp->n_todos);
             // ToDo: use buffer_todo
             ACQUIRE_SPIN_LOCK(&stp->sync_todo);
             if (stp->todos_last == NULL) {
             // ToDo: use buffer_todo
             ACQUIRE_SPIN_LOCK(&stp->sync_todo);
             if (stp->todos_last == NULL) {
index 873944c..9251290 100644 (file)
@@ -76,7 +76,7 @@ sweep(step *step)
           freed,
           blocks == 0 ? 0 : (freed * 100) / blocks,
           fragd, 
           freed,
           blocks == 0 ? 0 : (freed * 100) / blocks,
           fragd, 
-          (blocks - freed) == 0 ? 0 : ((live / BLOCK_SIZE_W) * 100) / (blocks - freed));
+          (unsigned long)((blocks - freed) == 0 ? 0 : ((live / BLOCK_SIZE_W) * 100) / (blocks - freed)));
 
     ASSERT(countBlocks(step->old_blocks) == step->n_old_blocks);
 }
 
     ASSERT(countBlocks(step->old_blocks) == step->n_old_blocks);
 }