From d3aacdebfc18450b32531dadf7d9c2d4091faba6 Mon Sep 17 00:00:00 2001 From: Richard Brooksby Date: Mon, 3 Sep 2012 13:15:34 +0100 Subject: [PATCH] Suppressing warnings revealed by increased level of optimisation and building the mps from mps.c Copied from Perforce Change: 179192 ServerID: perforce.ravenbrook.com --- mps/code/buffer.c | 2 +- mps/code/dbgpool.c | 4 ++-- mps/code/global.c | 2 +- mps/code/poolmrg.c | 2 +- mps/code/poolmv.c | 2 +- mps/code/poolmvff.c | 2 +- mps/code/poolsnc.c | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mps/code/buffer.c b/mps/code/buffer.c index 9b7748c6572..c7dc6edd82e 100644 --- a/mps/code/buffer.c +++ b/mps/code/buffer.c @@ -1330,7 +1330,7 @@ static void segBufAttach(Buffer buffer, Addr base, Addr limit, Addr init, Size size) { SegBuf segbuf; - Seg seg; + Seg seg = NULL; /* suppress "may be used uninitialized" */ Arena arena; Bool found; diff --git a/mps/code/dbgpool.c b/mps/code/dbgpool.c index c7978249596..c433d044ef1 100644 --- a/mps/code/dbgpool.c +++ b/mps/code/dbgpool.c @@ -224,7 +224,7 @@ static void freeSplat(PoolDebugMixin debug, Pool pool, Addr base, Addr limit) Addr p, next; Size freeSize = debug->freeSize; Arena arena; - Seg seg; + Seg seg = NULL; /* suppress "may be used uninitialized" */ Bool inSeg; AVER(base < limit); @@ -258,7 +258,7 @@ static Bool freeCheck(PoolDebugMixin debug, Pool pool, Addr base, Addr limit) Size freeSize = debug->freeSize; Res res; Arena arena; - Seg seg; + Seg seg = NULL; /* suppress "may be used uninitialized" */ Bool inSeg; AVER(base < limit); diff --git a/mps/code/global.c b/mps/code/global.c index 4d647a3754c..1997efbba6d 100644 --- a/mps/code/global.c +++ b/mps/code/global.c @@ -915,7 +915,7 @@ void ArenaPokeSeg(Arena arena, Seg seg, Addr addr, Ref ref) Ref ArenaRead(Arena arena, Addr addr) { Bool b; - Seg seg; + Seg seg = NULL; /* suppress "may be used uninitialized" */ AVERT(Arena, arena); diff --git a/mps/code/poolmrg.c b/mps/code/poolmrg.c index 6abba410f72..d55f8af9f3b 100644 --- a/mps/code/poolmrg.c +++ b/mps/code/poolmrg.c @@ -332,7 +332,7 @@ static Count MRGGuardiansPerSeg(MRG mrg) static RefPart MRGRefPartOfLink(Link link, Arena arena) { - Seg seg; + Seg seg = NULL; /* suppress "may be used uninitialized" */ Bool b; Link linkBase; Index index; diff --git a/mps/code/poolmv.c b/mps/code/poolmv.c index a7026276008..6a682da6707 100644 --- a/mps/code/poolmv.c +++ b/mps/code/poolmv.c @@ -574,7 +574,7 @@ static void MVFree(Pool pool, Addr old, Size size) MV mv; Res res; Bool b; - Tract tract; + Tract tract = NULL; /* suppress "may be used uninitialized" */ AVERT(Pool, pool); mv = Pool2MV(pool); diff --git a/mps/code/poolmvff.c b/mps/code/poolmvff.c index 1bbe1e85806..b83b58243bb 100644 --- a/mps/code/poolmvff.c +++ b/mps/code/poolmvff.c @@ -112,7 +112,7 @@ static void MVFFAddToFreeList(Addr *baseIO, Addr *limitIO, MVFF mvff) { */ static void MVFFFreeSegs(MVFF mvff, Addr base, Addr limit) { - Seg seg; + Seg seg = NULL; /* suppress "may be used uninitialized" */ Arena arena; Bool b; Addr segLimit; /* limit of the current segment when iterating */ diff --git a/mps/code/poolsnc.c b/mps/code/poolsnc.c index c9b1c20098e..eda496d450f 100644 --- a/mps/code/poolsnc.c +++ b/mps/code/poolsnc.c @@ -590,7 +590,7 @@ static void SNCFramePopPending(Pool pool, Buffer buf, AllocFrame frame) } else { Arena arena; - Seg seg; + Seg seg = NULL; /* suppress "may be used uninitialized" */ Bool foundSeg; arena = PoolArena(pool);