From: panne Date: Sat, 21 May 2005 16:09:18 +0000 (+0000) Subject: [project @ 2005-05-21 16:09:18 by panne] X-Git-Tag: Initial_conversion_from_CVS_complete~494 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=178c14217eddba162b9d90579580da6bf9e20fe9 [project @ 2005-05-21 16:09:18 by panne] Warning police (format strings, unused variables) --- diff --git a/ghc/rts/ProfHeap.c b/ghc/rts/ProfHeap.c index 70cafde..f30ef5d 100644 --- a/ghc/rts/ProfHeap.c +++ b/ghc/rts/ProfHeap.c @@ -744,15 +744,15 @@ dumpCensus( Census *census ) #ifdef PROFILING if (RtsFlags.ProfFlags.doHeapProfile == HEAP_BY_LDV) { - fprintf(hp_file, "VOID\t%lu\n", census->void_total * sizeof(W_)); + fprintf(hp_file, "VOID\t%lu\n", (unsigned long)(census->void_total) * sizeof(W_)); fprintf(hp_file, "LAG\t%lu\n", - (census->not_used - census->void_total) * sizeof(W_)); + (unsigned long)(census->not_used - census->void_total) * sizeof(W_)); fprintf(hp_file, "USE\t%lu\n", - (census->used - census->drag_total) * sizeof(W_)); + (unsigned long)(census->used - census->drag_total) * sizeof(W_)); fprintf(hp_file, "INHERENT_USE\t%lu\n", - census->prim * sizeof(W_)); - fprintf(hp_file, "DRAG\t%lu\n", census->drag_total * - sizeof(W_)); + (unsigned long)(census->prim) * sizeof(W_)); + fprintf(hp_file, "DRAG\t%lu\n", + (unsigned long)(census->drag_total) * sizeof(W_)); printSample(rtsFalse, census->time); return; } @@ -830,7 +830,7 @@ dumpCensus( Census *census ) } #endif - fprintf(hp_file, "\t%ld\n", count * sizeof(W_)); + fprintf(hp_file, "\t%lu\n", (unsigned long)count * sizeof(W_)); } printSample(rtsFalse, census->time); diff --git a/ghc/rts/Schedule.c b/ghc/rts/Schedule.c index 7ba2fc0..8e1a43e 100644 --- a/ghc/rts/Schedule.c +++ b/ghc/rts/Schedule.c @@ -4074,10 +4074,10 @@ printThreadBlockage(StgTSO *tso) { switch (tso->why_blocked) { case BlockedOnRead: - debugBelch("is blocked on read from fd %ld", tso->block_info.fd); + debugBelch("is blocked on read from fd %d", (int)(tso->block_info.fd)); break; case BlockedOnWrite: - debugBelch("is blocked on write to fd %ld", tso->block_info.fd); + debugBelch("is blocked on write to fd %d", (int)(tso->block_info.fd)); break; #if defined(mingw32_HOST_OS) case BlockedOnDoProc: @@ -4085,7 +4085,7 @@ printThreadBlockage(StgTSO *tso) break; #endif case BlockedOnDelay: - debugBelch("is blocked until %ld", tso->block_info.target); + debugBelch("is blocked until %ld", (long)(tso->block_info.target)); break; case BlockedOnMVar: debugBelch("is blocked on an MVar"); diff --git a/ghc/rts/Stable.c b/ghc/rts/Stable.c index a2829c6..93b2246 100644 --- a/ghc/rts/Stable.c +++ b/ghc/rts/Stable.c @@ -376,13 +376,13 @@ gcStablePtrTable( void ) if (p->sn_obj == NULL) { // StableName object is dead freeStableName(p); - IF_DEBUG(stable, debugBelch("GC'd Stable name %ld\n", + IF_DEBUG(stable, debugBelch("GC'd Stable name %d\n", p - stable_ptr_table)); continue; } else { p->addr = (StgPtr)isAlive((StgClosure *)p->addr); - IF_DEBUG(stable, debugBelch("Stable name %ld still alive at %p, ref %ld\n", p - stable_ptr_table, p->addr, p->ref)); + IF_DEBUG(stable, debugBelch("Stable name %d still alive at %p, ref %ld\n", p - stable_ptr_table, p->addr, p->ref)); } } } diff --git a/ghc/rts/Timer.c b/ghc/rts/Timer.c index 99a76c3..5be49a5 100644 --- a/ghc/rts/Timer.c +++ b/ghc/rts/Timer.c @@ -30,8 +30,10 @@ /* ticks left before next pre-emptive context switch */ static int ticks_to_ctxt_switch = 0; +#if defined(RTS_SUPPORTS_THREADS) /* idle ticks left before we perform a GC */ static int ticks_to_gc = 0; +#endif /* * Function: handle_tick()