]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Klaus Singvogel <kssingvo@suse.de>
authorrousskov <>
Wed, 14 Nov 2007 06:25:33 +0000 (06:25 +0000)
committerrousskov <>
Wed, 14 Nov 2007 06:25:33 +0000 (06:25 +0000)
Bug 2123 fix, part 1: GCC 4.3 warnings

Removed ignored type qualifiers from function return types.
Added parentheses around && within ||.

include/MemPool.h
lib/MemPool.cc
lib/libTrie/include/TrieCharTransform.h
src/client_side.cc
src/delay_pools.cc
src/icp_v2.cc
src/logfile.cc
src/neighbors.cc

index 251f66501b9bc2c7255dad8945b4836d610fd8c5..3c12194515251299fc82f35546a37ed3d34ef924 100644 (file)
@@ -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;
index f001a18bed8bf92c90c293956ba1e4053a1423d9..2c660f71daea6790255773ee83d84cc335ac1b42 100644 (file)
@@ -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;
index 523a39245c70babde2055ee14e54f7282fb8fcfa..bc3af9caaf96a845815116e9f9dcb32f62b40bea 100644 (file)
@@ -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 */
index 85c2f0ec704291b37cedbe3149faa409c11b426f..a2b0859e7a8ce3c9eaeef3ac5499007cf1462940 100644 (file)
@@ -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.");
index 8e7f7e731c975a14939fce5cc6c30aa58d40bf4c..7ac7af73add1e003165e9633025922286edfc4b6 100644 (file)
@@ -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 <robertc@squid-cache.org>
@@ -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<unsigned char, ClassCBucket> 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;
index f94945b8e8148ba50223ae40820ed5e414a03053..bc27107475cef68aed1ad3e82b9990bda2e52f08 100644 (file)
@@ -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;
     }
index 25b489a7d3665cf908c238c72d12ec118c897412..7762c56ef0023c5de0cfa0b324bbabb6cca6010e 100644 (file)
@@ -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
index 399abc204b181d71f8c4619006e7146dea0f0e24..b4e919eef842dfa9498031876b23c52837891995 100644 (file)
@@ -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;
         }