From 37ae27ae4e35f7d2e6aa74a8495175d3dd96e6ab Mon Sep 17 00:00:00 2001 From: Richard Brooksby Date: Wed, 19 Sep 2012 21:12:30 +0100 Subject: [PATCH] Suppress warning about pageretstruct_zero being unused. Copied from Perforce Change: 179568 ServerID: perforce.ravenbrook.com --- mps/code/poolamc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mps/code/poolamc.c b/mps/code/poolamc.c index fc71144ab84..dfac6e54db0 100644 --- a/mps/code/poolamc.c +++ b/mps/code/poolamc.c @@ -943,6 +943,16 @@ static Res amcInitComm(Pool pool, RankSet rankSet, va_list arg) Index i; size_t genArraySize; size_t genCount; + + /* Suppress a warning about this structure not being used when there + are no statistics. Note that simply making the declaration conditional + does not work, because we carefully reference expressions inside + STATISTICS to prevent such warnings on parameters and local variables. + It's just that clang 4.0 on Mac OS X does some sort of extra check + that produces a special warnings about static variables. */ +#if !defined(STATISTICS) + UNUSED(pageretstruct_Zero); +#endif AVER(pool != NULL);