From 10f3deb3a115c0ca0d755426efba4d7a28db7367 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Mon, 31 Jan 2011 19:20:32 -0700 Subject: [PATCH] Author: Francesco Chemolli Bug 2868: icc doesn't like string literal in assert checks --- lib/MemPool.cc | 7 +++++-- lib/MemPoolChunked.cc | 2 +- lib/MemPoolMalloc.cc | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/MemPool.cc b/lib/MemPool.cc index 271e6db07e..0b29f2b0b5 100644 --- a/lib/MemPool.cc +++ b/lib/MemPool.cc @@ -430,12 +430,15 @@ MemImplementingAllocator::~MemImplementingAllocator() { MemImplementingAllocator *find_pool, *prev_pool; - assert(MemPools::GetInstance().pools != NULL && "Called MemImplementingAllocator::~MemImplementingAllocator, but no pool exists!"); + /* Abort if the associated pool doesn't exist */ + assert(MemPools::GetInstance().pools != NULL ); /* Pool clean, remove it from List and free */ for (find_pool = MemPools::GetInstance().pools, prev_pool = NULL; (find_pool && this != find_pool); find_pool = find_pool->next) prev_pool = find_pool; - assert(find_pool != NULL && "pool to destroy not found"); + + /* make sure that we found the pool to destroy */ + assert(find_pool != NULL); if (prev_pool) prev_pool->next = next; diff --git a/lib/MemPoolChunked.cc b/lib/MemPoolChunked.cc index aa0786603e..6485b426b6 100644 --- a/lib/MemPoolChunked.cc +++ b/lib/MemPoolChunked.cc @@ -321,7 +321,7 @@ MemPoolChunked::~MemPoolChunked() flushMetersFull(); clean(0); - assert(meter.inuse.level == 0 && "While trying to destroy pool"); + assert(meter.inuse.level == 0); chunk = Chunks; while ( (fchunk = chunk) != NULL) { diff --git a/lib/MemPoolMalloc.cc b/lib/MemPoolMalloc.cc index bca0e9ff43..75759932da 100644 --- a/lib/MemPoolMalloc.cc +++ b/lib/MemPoolMalloc.cc @@ -120,7 +120,7 @@ MemPoolMalloc::MemPoolMalloc(char const *aLabel, size_t aSize) : MemImplementing MemPoolMalloc::~MemPoolMalloc() { - assert(meter.inuse.level == 0 && "While trying to destroy pool"); + assert(meter.inuse.level == 0); clean(0); } -- 2.47.3