From: rousskov <> Date: Wed, 14 Nov 2007 06:25:33 +0000 (+0000) Subject: Author: Klaus Singvogel X-Git-Tag: SQUID_3_0_STABLE1~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=871899ca281975be7c96356897fe078e170c63d9;p=thirdparty%2Fsquid.git Author: Klaus Singvogel Bug 2123 fix, part 1: GCC 4.3 warnings Removed ignored type qualifiers from function return types. Added parentheses around && within ||. --- diff --git a/include/MemPool.h b/include/MemPool.h index 251f66501b..3c12194515 100644 --- a/include/MemPool.h +++ b/include/MemPool.h @@ -85,7 +85,7 @@ class MemPools MemImplementingAllocator * create(const char *label, size_t obj_size); MemImplementingAllocator * create(const char *label, size_t obj_size, bool const chunked); void setIdleLimit(size_t new_idle_limit); - size_t const idleLimit() const; + size_t idleLimit() const; void clean(time_t maxage); void setDefaultPoolChunking(bool const &); MemImplementingAllocator *pools; diff --git a/lib/MemPool.cc b/lib/MemPool.cc index f001a18bed..2c660f71da 100644 --- a/lib/MemPool.cc +++ b/lib/MemPool.cc @@ -1,6 +1,6 @@ /* - * $Id: MemPool.cc,v 1.9 2007/09/20 11:26:22 amosjeffries Exp $ + * $Id: MemPool.cc,v 1.10 2007/11/13 23:25:33 rousskov Exp $ * * DEBUG: section 63 Low Level Memory Pool Management * AUTHOR: Alex Rousskov, Andres Kroonmaa, Robert Collins @@ -159,7 +159,7 @@ MemPools::setIdleLimit(size_t new_idle_limit) mem_idle_limit = new_idle_limit; } -size_t const +size_t MemPools::idleLimit() const { return mem_idle_limit; diff --git a/lib/libTrie/include/TrieCharTransform.h b/lib/libTrie/include/TrieCharTransform.h index 523a39245c..bc3af9caaf 100644 --- a/lib/libTrie/include/TrieCharTransform.h +++ b/lib/libTrie/include/TrieCharTransform.h @@ -50,12 +50,12 @@ class TrieCharTransform public: virtual ~TrieCharTransform() {} - virtual char const operator () (char const) = 0; + virtual char operator () (char const) const = 0; }; class TrieCaseless : public TrieCharTransform { - virtual char const operator () (char const aChar) {return tolower(aChar);} + virtual char operator () (char const aChar) const {return tolower(aChar);} }; #endif /* __cplusplus */ diff --git a/src/client_side.cc b/src/client_side.cc index 85c2f0ec70..a2b0859e7a 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.768 2007/10/30 21:52:30 rousskov Exp $ + * $Id: client_side.cc,v 1.769 2007/11/13 23:25:34 rousskov Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -925,7 +925,7 @@ ClientSocketContext::packRange(StoreIOBuffer const &source, MemBuf * mb) /* * paranoid check */ - assert(available.size() >= 0 && i->debt() >= 0 || i->debt() == -1); + assert((available.size() >= 0 && i->debt() >= 0) || i->debt() == -1); if (!canPackMoreRanges()) { debugs(33, 3, "clientPackRange: Returning because !canPackMoreRanges."); diff --git a/src/delay_pools.cc b/src/delay_pools.cc index 8e7f7e731c..7ac7af73ad 100644 --- a/src/delay_pools.cc +++ b/src/delay_pools.cc @@ -1,6 +1,6 @@ /* - * $Id: delay_pools.cc,v 1.48 2007/04/28 22:26:37 hno Exp $ + * $Id: delay_pools.cc,v 1.49 2007/11/13 23:25:34 rousskov Exp $ * * DEBUG: section 77 Delay Pools * AUTHOR: Robert Collins @@ -152,7 +152,7 @@ protected: virtual char const *label() const = 0; - virtual unsigned int const makeKey (struct IN_ADDR &src_addr) const = 0; + virtual unsigned int makeKey (struct IN_ADDR &src_addr) const = 0; DelaySpec spec; @@ -182,7 +182,7 @@ public: protected: virtual char const *label() const {return "Individual";} - virtual unsigned int const makeKey (struct IN_ADDR &src_addr) const; + virtual unsigned int makeKey (struct IN_ADDR &src_addr) const; }; @@ -196,7 +196,7 @@ public: protected: virtual char const *label() const {return "Network";} - virtual unsigned int const makeKey (struct IN_ADDR &src_addr) const; + virtual unsigned int makeKey (struct IN_ADDR &src_addr) const; }; /* don't use remote storage for these */ @@ -239,9 +239,9 @@ protected: virtual char const *label() const {return "Individual";} - virtual unsigned int const makeKey (struct IN_ADDR &src_addr) const; + virtual unsigned int makeKey (struct IN_ADDR &src_addr) const; - unsigned char const makeHostKey (struct IN_ADDR &src_addr) const; + unsigned char makeHostKey (struct IN_ADDR &src_addr) const; DelaySpec spec; VectorMap buckets; @@ -844,8 +844,7 @@ VectorPool::Id::bytesIn(int qty) } -unsigned int const - +unsigned int IndividualPool::makeKey (struct IN_ADDR &src_addr) const { unsigned int host; @@ -867,8 +866,7 @@ ClassCNetPool::operator delete (void *address) ::operator delete (address); } -unsigned int const - +unsigned int ClassCNetPool::makeKey (struct IN_ADDR &src_addr) const { unsigned int net; @@ -937,8 +935,7 @@ ClassCHostPool::keyAllocated (unsigned char const key) const return buckets.indexUsed(buckets.findKeyIndex (key)); } -unsigned char const - +unsigned char ClassCHostPool::makeHostKey (struct IN_ADDR &src_addr) const { unsigned int host; @@ -946,8 +943,7 @@ ClassCHostPool::makeHostKey (struct IN_ADDR &src_addr) const return host; } -unsigned int const - +unsigned int ClassCHostPool::makeKey (struct IN_ADDR &src_addr) const { unsigned int net; diff --git a/src/icp_v2.cc b/src/icp_v2.cc index f94945b8e8..bc27107475 100644 --- a/src/icp_v2.cc +++ b/src/icp_v2.cc @@ -1,6 +1,6 @@ /* - * $Id: icp_v2.cc,v 1.99 2007/04/30 16:56:09 wessels Exp $ + * $Id: icp_v2.cc,v 1.100 2007/11/13 23:25:34 rousskov Exp $ * * DEBUG: section 12 Internet Cache Protocol * AUTHOR: Duane Wessels @@ -335,7 +335,7 @@ icpGetCommonOpcode() { /* if store is rebuilding, return a UDP_MISS_NOFETCH */ - if (StoreController::store_dirs_rebuilding && opt_reload_hit_only || + if ((StoreController::store_dirs_rebuilding && opt_reload_hit_only) || hit_only_mode_until > squid_curtime) { return ICP_MISS_NOFETCH; } diff --git a/src/logfile.cc b/src/logfile.cc index 25b489a7d3..7762c56ef0 100644 --- a/src/logfile.cc +++ b/src/logfile.cc @@ -1,5 +1,5 @@ /* - * $Id: logfile.cc,v 1.24 2007/08/21 23:50:12 hno Exp $ + * $Id: logfile.cc,v 1.25 2007/11/13 23:25:34 rousskov Exp $ * * DEBUG: section 50 Log file handling * AUTHOR: Duane Wessels @@ -115,7 +115,7 @@ logfileOpen(const char *path, size_t bufsz, int fatal_flag) if (delim != NULL) lf->syslog_priority |= syslog_ntoa(delim+1); - if (0 == lf->syslog_priority & PRIORITY_MASK) + if (0 == (lf->syslog_priority & PRIORITY_MASK)) lf->syslog_priority |= LOG_INFO; } } else diff --git a/src/neighbors.cc b/src/neighbors.cc index 399abc204b..b4e919eef8 100644 --- a/src/neighbors.cc +++ b/src/neighbors.cc @@ -1,6 +1,6 @@ /* - * $Id: neighbors.cc,v 1.349 2007/04/30 16:56:09 wessels Exp $ + * $Id: neighbors.cc,v 1.350 2007/11/13 23:25:34 rousskov Exp $ * * DEBUG: section 15 Neighbor Routines * AUTHOR: Harvest Derived @@ -319,7 +319,7 @@ getRoundRobinParent(HttpRequest * request) if (p->weight == 1) { if (q && q->rr_count < p->rr_count) continue; - } else if (p->weight == 0 || q && q->rr_count < (p->rr_count / p->weight)) { + } else if (p->weight == 0 || (q && q->rr_count < (p->rr_count / p->weight))) { continue; }