From 3ef063c80fcc44fd8a67c75ef96c2587fafc8e66 Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Fri, 4 Sep 2015 22:28:40 +0100 Subject: [PATCH] Avoid "iso c90 forbids mixed declarations and code" error from gcc. Copied from Perforce Change: 188257 ServerID: perforce.ravenbrook.com --- mps/code/policy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mps/code/policy.c b/mps/code/policy.c index b172405ab6b..b207910afbf 100644 --- a/mps/code/policy.c +++ b/mps/code/policy.c @@ -160,6 +160,8 @@ static double policyCollectionTime(Arena arena) Bool PolicyShouldCollectWorld(Arena arena, double availableTime, Clock now, Clock clocks_per_sec) { + Size collectableSize; + AVERT(Arena, arena); /* Can't collect the world if we're not given any time. */ AVER(availableTime > 0.0); @@ -167,7 +169,7 @@ Bool PolicyShouldCollectWorld(Arena arena, double availableTime, AVER(arena->busyTraces == TraceSetEMPTY); /* Don't collect the world if it's very small. */ - Size collectableSize = ArenaCollectable(arena); + collectableSize = ArenaCollectable(arena); if (collectableSize > ARENA_MINIMUM_COLLECTABLE_SIZE) { /* How long would it take to collect the world? */ double collectionTime = policyCollectionTime(arena);