From: Francesco Chemolli Date: Tue, 25 Jan 2011 22:46:53 +0000 (+0100) Subject: Portability fix: icc doesn't like string literal in assert checks X-Git-Tag: take03^2~59 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=12489dcbb6acd160728a01a830044ae8635a5533;p=thirdparty%2Fsquid.git Portability fix: icc doesn't like string literal in assert checks --- diff --git a/lib/MemPool.cc b/lib/MemPool.cc index fd58d41bf8..3e6143af90 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); }