summaryrefslogtreecommitdiff
path: root/rts/STM.c
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-06-24 20:51:13 +0100
committerIan Lynagh <igloo@earth.li>2011-06-25 19:16:32 +0100
commit0a6f26f6d29c8762b254e2f1040fce5c3571feea (patch)
tree6706444dab64cb0c2d6143ecb17db0e9ca2fc0cd /rts/STM.c
parent12b93887fd8b6a185b1bff994c865c897d22a6a6 (diff)
downloadhaskell-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/STM.c')
-rw-r--r--rts/STM.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/STM.c b/rts/STM.c
index e8d3fc0e0b..f8f56a2905 100644
--- a/rts/STM.c
+++ b/rts/STM.c
@@ -1089,7 +1089,7 @@ static void disconnect_invariant(Capability *cap,
FOR_EACH_ENTRY(last_execution, e, {
StgTVar *s = e -> tvar;
StgTVarWatchQueue *q = s -> first_watch_queue_entry;
- StgBool found = FALSE;
+ DEBUG_ONLY( StgBool found = FALSE );
TRACE(" looking for trec on tvar=%p", s);
for (q = s -> first_watch_queue_entry;
q != END_STM_WATCH_QUEUE;
@@ -1110,7 +1110,7 @@ static void disconnect_invariant(Capability *cap,
}
TRACE(" found it in watch queue entry %p", q);
free_stg_tvar_watch_queue(cap, q);
- found = TRUE;
+ DEBUG_ONLY( found = TRUE );
break;
}
}