]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 3676: Fix Shadowed variables
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 21 Jan 2013 08:15:06 +0000 (21:15 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 21 Jan 2013 08:15:06 +0000 (21:15 +1300)
This resolves some more shadowed variables by renaming. Allowing Squid to
build clean with -Wshadow. There should be no logic changes in this patch.

src/store_rebuild.cc

index a601b06e6c2a7b9d6398e2a50b2ac6d36abcffc9..c9cec3747fdef276d97d82b626658c1c8cd54e0d 100644 (file)
@@ -294,8 +294,7 @@ struct InitStoreEntry : public unary_function<StoreMeta, void> {
 };
 
 bool
-storeRebuildLoadEntry(int fd, int diskIndex, MemBuf &buf,
-                      StoreRebuildData &counts)
+storeRebuildLoadEntry(int fd, int diskIndex, MemBuf &buf, StoreRebuildData &)
 {
     if (fd < 0)
         return false;
@@ -317,7 +316,7 @@ storeRebuildLoadEntry(int fd, int diskIndex, MemBuf &buf,
 
 bool
 storeRebuildParseEntry(MemBuf &buf, StoreEntry &tmpe, cache_key *key,
-                       StoreRebuildData &counts,
+                       StoreRebuildData &stats,
                        uint64_t expectedSize)
 {
     int swap_hdr_len = 0;
@@ -374,7 +373,7 @@ storeRebuildParseEntry(MemBuf &buf, StoreEntry &tmpe, cache_key *key,
     }
 
     if (EBIT_TEST(tmpe.flags, KEY_PRIVATE)) {
-        ++ counts.badflags;
+        ++ stats.badflags;
         return false;
     }
 
@@ -382,8 +381,7 @@ storeRebuildParseEntry(MemBuf &buf, StoreEntry &tmpe, cache_key *key,
 }
 
 bool
-storeRebuildKeepEntry(const StoreEntry &tmpe, const cache_key *key,
-                      StoreRebuildData &counts)
+storeRebuildKeepEntry(const StoreEntry &tmpe, const cache_key *key, StoreRebuildData &stats)
 {
     /* this needs to become
      * 1) unpack url
@@ -408,7 +406,7 @@ storeRebuildKeepEntry(const StoreEntry &tmpe, const cache_key *key,
         if (e->lastref >= tmpe.lastref) {
             /* key already exists, old entry is newer */
             /* keep old, ignore new */
-            ++counts.dupcount;
+            ++stats.dupcount;
 
             // For some stores, get() creates/unpacks a store entry. Signal
             // such stores that we will no longer use the get() result:
@@ -420,7 +418,7 @@ storeRebuildKeepEntry(const StoreEntry &tmpe, const cache_key *key,
             /* URL already exists, this swapfile not being used */
             /* junk old, load new */
             e->release();      /* release old entry */
-            ++counts.dupcount;
+            ++stats.dupcount;
         }
     }