diff --git a/mps/src/fmtdy.c b/mps/src/fmtdy.c index aa1289933b2..aea38faa678 100644 --- a/mps/src/fmtdy.c +++ b/mps/src/fmtdy.c @@ -1,6 +1,6 @@ /* impl.c.fmtdy: DYLAN OBJECT FORMAT IMPLEMENTATION * - * $HopeName: MMsrc!fmtdy.c(trunk.10) $ + * $HopeName: MMsrc!fmtdy.c(trunk.11) $ * Copyright (C) 1996,1997 Harlequin Group, all rights reserved. * * All objects, B: @@ -65,6 +65,7 @@ #define notreached() assert(0) +#define unused(param) ((void)param) #define ALIGN sizeof(mps_word_t) @@ -277,6 +278,8 @@ static mps_res_t dylan_scan_pat(mps_ss_t mps_ss, int b; /* bit */ mps_addr_t r; /* reference to be fixed */ + unused(nr_pats); + MPS_SCAN_BEGIN(mps_ss) { p = base; goto in; @@ -614,6 +617,7 @@ static void dylan_copy(mps_addr_t old, mps_addr_t new) static void dylan_no_copy(mps_addr_t old, mps_addr_t new) { + unused(old); unused(new); notreached(); } @@ -631,6 +635,7 @@ static mps_addr_t dylan_isfwd(mps_addr_t object) static mps_addr_t dylan_no_isfwd(mps_addr_t object) { + unused(object); notreached(); return 0; } @@ -655,6 +660,7 @@ static void dylan_fwd(mps_addr_t old, mps_addr_t new) static void dylan_no_fwd(mps_addr_t old, mps_addr_t new) { + unused(old); unused(new); notreached(); } @@ -673,6 +679,7 @@ static void dylan_pad(mps_addr_t addr, size_t size) static void dylan_no_pad(mps_addr_t addr, size_t size) { + unused(addr); unused(size); notreached(); } @@ -793,5 +800,8 @@ mps_bool_t dylan_check(mps_addr_t addr) assert(addr != 0); assert(((mps_word_t)addr & (ALIGN-1)) == 0); assert(dylan_wrapper_check((mps_word_t *)((mps_word_t *)addr)[0])); + /* .assert.unused: Asserts throw away their conditions */ + /* in hot varieties, so UNUSED is needed. */ + unused(addr); return 1; } diff --git a/mps/src/poolams.c b/mps/src/poolams.c index 7dc38ba45a6..1d0c4cbe018 100644 --- a/mps/src/poolams.c +++ b/mps/src/poolams.c @@ -1,10 +1,8 @@ /* impl.c.poolams: AUTOMATIC MARK & SWEEP POOL CLASS * - * $HopeName: MMsrc!poolams.c(trunk.10) $ + * $HopeName: MMsrc!poolams.c(trunk.11) $ * Copyright (C) 1997 The Harlequin Group Limited. All rights reserved. * - * NOTES - * * .readership: any MPS developer. * * .scope: Implementation of a basic mark/sweep pool. @@ -19,7 +17,7 @@ #include "mpm.h" #include "mpscams.h" -SRCID(poolams, "$HopeName: MMsrc!poolams.c(trunk.10) $"); +SRCID(poolams, "$HopeName: MMsrc!poolams.c(trunk.11) $"); #define AMSSig ((Sig)0x519A3599) /* SIGnature AMS */ @@ -636,6 +634,7 @@ static Res AMSIterate(AMS ams, AMSGroup group, Seg seg, Arena arena, format = ams->format; alignment = PoolAlignment(AMSPool(ams)); AVER(alignment == format->alignment); /* design.mps.poolams.align */ + UNUSED(arena); p = SegBase(seg); limit = SegLimit(seg);