diff options
author | Ian Lynagh <igloo@earth.li> | 2011-06-24 20:51:13 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2011-06-25 19:16:32 +0100 |
commit | 0a6f26f6d29c8762b254e2f1040fce5c3571feea (patch) | |
tree | 6706444dab64cb0c2d6143ecb17db0e9ca2fc0cd /rts/ProfHeap.c | |
parent | 12b93887fd8b6a185b1bff994c865c897d22a6a6 (diff) | |
download | haskell-0a6f26f6d29c8762b254e2f1040fce5c3571feea.tar.gz |
Fix gcc 4.6 warnings; fixes #5176
Based on a patch from David Terei.
Some parts are a little ugly (e.g. defining things that only ASSERTs
use only when DEBUG is defined), so we might want to tweak things a
little.
I've also turned off -Werror for didn't-inline warnings, as we now
get a few such warnings.
Diffstat (limited to 'rts/ProfHeap.c')
-rw-r--r-- | rts/ProfHeap.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/rts/ProfHeap.c b/rts/ProfHeap.c index 7d2a450129..c41f3615a2 100644 --- a/rts/ProfHeap.c +++ b/rts/ProfHeap.c @@ -839,7 +839,7 @@ heapCensusChain( Census *census, bdescr *bd ) nat size; counter *ctr; nat real_size; - rtsBool prim; + PROFILING_ONLY( rtsBool prim ); for (; bd != NULL; bd = bd->link) { @@ -854,7 +854,7 @@ heapCensusChain( Census *census, bdescr *bd ) p = bd->start; while (p < bd->free) { info = get_itbl((StgClosure *)p); - prim = rtsFalse; + PROFILING_ONLY( prim = rtsFalse ); switch (info->type) { @@ -904,7 +904,7 @@ heapCensusChain( Census *census, bdescr *bd ) break; case BCO: - prim = rtsTrue; + PROFILING_ONLY ( prim = rtsTrue ); size = bco_sizeW((StgBCO *)p); break; @@ -915,7 +915,7 @@ heapCensusChain( Census *census, bdescr *bd ) case MUT_PRIM: case MUT_VAR_CLEAN: case MUT_VAR_DIRTY: - prim = rtsTrue; + PROFILING_ONLY ( prim = rtsTrue ); size = sizeW_fromITBL(info); break; @@ -932,7 +932,7 @@ heapCensusChain( Census *census, bdescr *bd ) break; case ARR_WORDS: - prim = rtsTrue; + PROFILING_ONLY ( prim = rtsTrue ); size = arr_words_sizeW((StgArrWords*)p); break; @@ -940,12 +940,12 @@ heapCensusChain( Census *census, bdescr *bd ) case MUT_ARR_PTRS_DIRTY: case MUT_ARR_PTRS_FROZEN: case MUT_ARR_PTRS_FROZEN0: - prim = rtsTrue; + PROFILING_ONLY ( prim = rtsTrue ); size = mut_arr_ptrs_sizeW((StgMutArrPtrs *)p); break; case TSO: - prim = rtsTrue; + PROFILING_ONLY ( prim = rtsTrue ); #ifdef PROFILING if (RtsFlags.ProfFlags.includeTSOs) { size = sizeofW(StgTSO); @@ -961,7 +961,7 @@ heapCensusChain( Census *census, bdescr *bd ) #endif case STACK: - prim = rtsTrue; + PROFILING_ONLY ( prim = rtsTrue ); #ifdef PROFILING if (RtsFlags.ProfFlags.includeTSOs) { size = stack_sizeW((StgStack*)p); @@ -977,7 +977,7 @@ heapCensusChain( Census *census, bdescr *bd ) #endif case TREC_CHUNK: - prim = rtsTrue; + PROFILING_ONLY ( prim = rtsTrue ); size = sizeofW(StgTRecChunk); break; |