From: ken Date: Tue, 7 Aug 2001 19:34:01 +0000 (+0000) Subject: [project @ 2001-08-07 19:34:01 by ken] X-Git-Tag: Approximately_9120_patches~1331 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=1e402dba89c2ec3ce8b39827296c5b24c4e61173;hp=565a4494b5bedd68c0a6d468c78f542477b89aa7;p=ghc-hetmet.git [project @ 2001-08-07 19:34:01 by ken] Fix 32-bit assumptions in debugging fprintf's. --- diff --git a/ghc/rts/ProfHeap.c b/ghc/rts/ProfHeap.c index 40137b7..fb872ea 100644 --- a/ghc/rts/ProfHeap.c +++ b/ghc/rts/ProfHeap.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: ProfHeap.c,v 1.23 2001/07/23 17:23:19 simonmar Exp $ + * $Id: ProfHeap.c,v 1.24 2001/08/07 19:34:01 ken Exp $ * * (c) The GHC Team, 1998-2000 * @@ -308,7 +308,7 @@ fprint_data(FILE *fp) nat i; for (i = 0; i < SYMBOL_HASH_SIZE; i++) { if (symbol_hash[i].data > 0) { - fprintf(fp, " %s %d\n", symbol_hash[i].name, symbol_hash[i].data); + fprintf(fp, " %s %lu\n", symbol_hash[i].name, (unsigned long)symbol_hash[i].data); } } } @@ -392,7 +392,7 @@ fprint_closure_types(FILE *fp) for (i = 0; i < N_CLOSURE_TYPES; i++) { if (closure_types[i]) { - fprintf(fp, " %s %d\n", type_names[i], closure_types[i]); + fprintf(fp, " %s %lu\n", type_names[i], (unsigned long)closure_types[i]); } } } @@ -520,7 +520,9 @@ heapCensus(void) StgDouble time; nat size; StgPtr p; +#ifdef PROFILING nat elapsed; +#endif #ifdef DEBUG_HEAP_PROF switch (RtsFlags.ProfFlags.doHeapProfile) {