]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fixed some cases of linkage type mismatch and parameter shadowing
authorFrancesco Chemolli <kinkie@squid-cache.org>
Tue, 17 Nov 2009 10:07:53 +0000 (11:07 +0100)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Tue, 17 Nov 2009 10:07:53 +0000 (11:07 +0100)
12 files changed:
src/DiskIO/DiskDaemon/diskd.cc
src/StoreMeta.cc
src/acl/Ip.cc
src/auth/negotiate/auth_negotiate.cc
src/auth/ntlm/auth_ntlm.cc
src/client_side_reply.cc
src/comm.cc
src/fs/ufs/store_dir_ufs.cc
src/fs/ufs/store_io_ufs.cc
src/fs/ufs/ufscommon.cc
src/mem.cc
src/protos.h

index d5703107ed62201048864601b97ee90e7d93fe01..0a48f96b5e2bc3ca63e717b2beb61e5d36d451bc 100644 (file)
@@ -302,11 +302,13 @@ fsHash(const void *key, unsigned int n)
     return (*k & (--n));
 }
 
+SQUIDCEXTERN {
 static void
 alarm_handler(int sig)
 {
     (void) 0;
 }
+};
 
 int
 main(int argc, char *argv[])
index 0211d1973d9a91b75b1120afdc8220404b41d87b..4065a4854cdea85eb0743a03313a3c3d791c6f57 100644 (file)
@@ -101,10 +101,10 @@ const int StoreMeta::MinimumTLVLength = 0;
 const int StoreMeta::MaximumTLVLength = 1 << 16;
 
 bool
-StoreMeta::validLength(int length) const
+StoreMeta::validLength(int aLength) const
 {
-    if (!IntRange (MinimumTLVLength, MaximumTLVLength).includes(length)) {
-        debugs(20, 0, "storeSwapMetaUnpack: insane length (" << length << ")!");
+    if (!IntRange (MinimumTLVLength, MaximumTLVLength).includes(aLength)) {
+        debugs(20, 0, "storeSwapMetaUnpack: insane length (" << aLength << ")!");
         return false;
     }
 
index 95545bd8d6fc219556c698d3e128b389f21949ed..b67a679fe4b68572354bc52feacbec8d20c93eb3 100644 (file)
@@ -508,10 +508,10 @@ ACLIP::parse()
 
         while (q != NULL) {
             /* pop each result off the list and add it to the data tree individually */
-            acl_ip_data *next = q->next;
+            acl_ip_data *next_node = q->next;
             q->next = NULL;
             data = data->insert(q, acl_ip_data::NetworkCompare);
-            q = next;
+            q = next_node;
         }
     }
 }
index 01c2f713ba235ff0693a43a4640e4c9de01d1a47..78eb37b73def667b945a3a31b495953bd7984470 100644 (file)
@@ -660,7 +660,7 @@ AuthNegotiateUserRequest::authenticated() const
 }
 
 void
-AuthNegotiateUserRequest::authenticate(HttpRequest * request, ConnStateData * conn, http_hdr_type type)
+AuthNegotiateUserRequest::authenticate(HttpRequest * aRequest, ConnStateData * conn, http_hdr_type type)
 {
     const char *proxy_auth, *blob;
 
@@ -694,7 +694,7 @@ AuthNegotiateUserRequest::authenticate(HttpRequest * request, ConnStateData * co
     }
 
     /* get header */
-    proxy_auth = request->header.getStr(type);
+    proxy_auth = aRequest->header.getStr(type);
 
     /* locate second word */
     blob = proxy_auth;
@@ -722,8 +722,8 @@ AuthNegotiateUserRequest::authenticate(HttpRequest * request, ConnStateData * co
         assert(conn->auth_user_request == NULL);
         conn->auth_user_request = this;
         AUTHUSERREQUESTLOCK(conn->auth_user_request, "conn");
-        this->request = request;
-        HTTPMSGLOCK(this->request);
+        request = aRequest;
+        HTTPMSGLOCK(request);
         return;
 
         break;
@@ -743,10 +743,10 @@ AuthNegotiateUserRequest::authenticate(HttpRequest * request, ConnStateData * co
 
         client_blob = xstrdup (blob);
 
-        if (this->request)
-            HTTPMSGUNLOCK(this->request);
-        this->request = request;
-        HTTPMSGLOCK(this->request);
+        if (request)
+            HTTPMSGUNLOCK(request);
+        request = aRequest;
+        HTTPMSGLOCK(request);
         return;
 
         break;
index bc1cb5e12b9cbe603b5b807ca3ae25aef15896d8..003f9ebab996bb25b2d581b433231b5539e0ee3e 100644 (file)
@@ -577,7 +577,7 @@ AuthNTLMUserRequest::authenticated() const
 }
 
 void
-AuthNTLMUserRequest::authenticate(HttpRequest * request, ConnStateData * conn, http_hdr_type type)
+AuthNTLMUserRequest::authenticate(HttpRequest * aRequest, ConnStateData * conn, http_hdr_type type)
 {
     const char *proxy_auth, *blob;
 
@@ -611,7 +611,7 @@ AuthNTLMUserRequest::authenticate(HttpRequest * request, ConnStateData * conn, h
     }
 
     /* get header */
-    proxy_auth = request->header.getStr(type);
+    proxy_auth = aRequest->header.getStr(type);
 
     /* locate second word */
     blob = proxy_auth;
@@ -640,8 +640,8 @@ AuthNTLMUserRequest::authenticate(HttpRequest * request, ConnStateData * conn, h
         assert(conn->auth_user_request == NULL);
         conn->auth_user_request = this;
         AUTHUSERREQUESTLOCK(conn->auth_user_request, "conn");
-        this->request = request;
-        HTTPMSGLOCK(this->request);
+        request = aRequest;
+        HTTPMSGLOCK(request);
         return;
 
         break;
@@ -661,10 +661,10 @@ AuthNTLMUserRequest::authenticate(HttpRequest * request, ConnStateData * conn, h
 
         client_blob = xstrdup (blob);
 
-        if (this->request)
-            HTTPMSGUNLOCK(this->request);
-        this->request = request;
-        HTTPMSGLOCK(this->request);
+        if (request)
+            HTTPMSGUNLOCK(request);
+        request = aRequest;
+        HTTPMSGLOCK(request);
         return;
 
         break;
index 9e0c675eb8ecf23d3f2f5c4dab7672ec70ca35a3..848c89912e5ebfcacb24aac5cdef3da636956474 100644 (file)
@@ -126,11 +126,11 @@ clientReplyContext::removeStoreReference(store_client ** scp,
         StoreEntry ** ep)
 {
     StoreEntry *e;
-    store_client *sc = *scp;
+    store_client *sc_tmp = *scp;
 
     if ((e = *ep) != NULL) {
         *ep = NULL;
-        storeUnregister(sc, e, this);
+        storeUnregister(sc_tmp, e, this);
         *scp = NULL;
         e->unlock();
     }
index 1319eccdda7f4a83a17df0d04da81ef8af022716..3917b9514cbabf4ba2e2f100650d6a9d702fe4f7 100644 (file)
@@ -265,7 +265,7 @@ private:
 
 typedef enum {
     COMM_CB_READ = 1,
-    COMM_CB_DERIVED,
+    COMM_CB_DERIVED
 } comm_callback_t;
 
 struct _fd_debug_t {
index 1f40f900aadca20a3bee7f7b1f7c2dff07746b8f..70ce7af7fed0b28da9749289c73da32266679ce6 100644 (file)
@@ -108,7 +108,7 @@ UFSSwapDir::parseSizeL1L2()
  */
 
 void
-UFSSwapDir::reconfigure(int index, char *path)
+UFSSwapDir::reconfigure(int aIndex, char *aPath)
 {
     parseSizeL1L2();
     parseOptions(1);
@@ -490,50 +490,50 @@ UFSSwapDir::swapSubDir(int subdirn)const
 }
 
 int
-UFSSwapDir::createDirectory(const char *path, int should_exist)
+UFSSwapDir::createDirectory(const char *aPath, int should_exist)
 {
     int created = 0;
 
     struct stat st;
     getCurrentTime();
 
-    if (0 == ::stat(path, &st)) {
+    if (0 == ::stat(aPath, &st)) {
         if (S_ISDIR(st.st_mode)) {
-            debugs(47, (should_exist ? 3 : 1), path << " exists");
+            debugs(47, (should_exist ? 3 : 1), aPath << " exists");
         } else {
-            fatalf("Swap directory %s is not a directory.", path);
+            fatalf("Swap directory %s is not a directory.", aPath);
         }
 
 #ifdef _SQUID_MSWIN_
 
-    } else if (0 == mkdir(path)) {
+    } else if (0 == mkdir(aPath)) {
 #else
 
-    } else if (0 == mkdir(path, 0755)) {
+    } else if (0 == mkdir(aPath, 0755)) {
 #endif
-        debugs(47, (should_exist ? 1 : 3), path << " created");
+        debugs(47, (should_exist ? 1 : 3), aPath << " created");
         created = 1;
     } else {
         fatalf("Failed to make swap directory %s: %s",
-               path, xstrerror());
+               aPath, xstrerror());
     }
 
     return created;
 }
 
 bool
-UFSSwapDir::pathIsDirectory(const char *path)const
+UFSSwapDir::pathIsDirectory(const char *aPath)const
 {
 
     struct stat sb;
 
-    if (::stat(path, &sb) < 0) {
-        debugs(47, 0, "" << path << ": " << xstrerror());
+    if (::stat(aPath, &sb) < 0) {
+        debugs(47, 0, "" << aPath << ": " << xstrerror());
         return false;
     }
 
     if (S_ISDIR(sb.st_mode) == 0) {
-        debugs(47, 0, "" << path << " is not a directory");
+        debugs(47, 0, "" << aPath << " is not a directory");
         return false;
     }
 
@@ -687,7 +687,7 @@ UFSSwapDir::addDiskRestore(const cache_key * key,
                            time_t lastref,
                            time_t lastmod,
                            u_int32_t refcount,
-                           u_int16_t flags,
+                           u_int16_t newFlags,
                            int clean)
 {
     StoreEntry *e = NULL;
@@ -708,7 +708,7 @@ UFSSwapDir::addDiskRestore(const cache_key * key,
     e->expires = expires;
     e->lastmod = lastmod;
     e->refcount = refcount;
-    e->flags = flags;
+    e->flags = newFlags;
     EBIT_SET(e->flags, ENTRY_CACHABLE);
     EBIT_CLR(e->flags, RELEASE_REQUEST);
     EBIT_CLR(e->flags, KEY_PRIVATE);
@@ -1389,10 +1389,10 @@ StoreSearchUFS::~StoreSearchUFS()
 }
 
 void
-StoreSearchUFS::next(void (callback)(void *cbdata), void *cbdata)
+StoreSearchUFS::next(void (aCallback)(void *cbdata), void *aCallbackArgs)
 {
     next();
-    callback (cbdata);
+    aCallback(aCallbackArgs);
 }
 
 bool
index 1f86970dee1d6cdd7ec4dee10d8f7574f99556aa..9b374e7f6dcfd234089ee6eb98b577d7a2264ae6 100644 (file)
@@ -198,22 +198,22 @@ UFSStoreState::close()
 }
 
 void
-UFSStoreState::read_(char *buf, size_t size, off_t offset, STRCB * callback, void *callback_data)
+UFSStoreState::read_(char *buf, size_t size, off_t offset, STRCB * aCallback, void *aCallbackData)
 {
     assert(read.callback == NULL);
     assert(read.callback_data == NULL);
     assert(!reading);
     assert(!closing);
-    assert (callback);
+    assert (aCallback);
 
     if (!theFile->canRead()) {
         debugs(79, 3, "UFSStoreState::read_: queueing read because theFile can't read");
-        queueRead (buf, size, offset, callback, callback_data);
+        queueRead (buf, size, offset, aCallback, aCallbackData);
         return;
     }
 
-    read.callback = callback;
-    read.callback_data = cbdataReference(callback_data);
+    read.callback = aCallback;
+    read.callback_data = cbdataReference(aCallbackData);
     debugs(79, 3, "UFSStoreState::read_: dirno " << swap_dirn  << ", fileno "<<
            std::setfill('0') << std::hex << std::uppercase << std::setw(8) << swap_filen);
     offset_ = offset;
@@ -311,9 +311,9 @@ UFSStoreState::readCompleted(const char *buf, int len, int errflag, RefCount<Rea
     if (len > 0)
         offset_ += len;
 
-    STRCB *callback = read.callback;
+    STRCB *callback_ = read.callback;
 
-    assert(callback);
+    assert(callback_);
 
     read.callback = NULL;
 
@@ -335,7 +335,7 @@ UFSStoreState::readCompleted(const char *buf, int len, int errflag, RefCount<Rea
         if (len > 0 && read_buf != buf)
             memcpy(read_buf, buf, len);
 
-        callback(cbdata, read_buf, len, this);
+        callback_(cbdata, read_buf, len, this);
     }
 
     if (flags.try_closing || (theFile != NULL && theFile->error()) )
@@ -461,7 +461,7 @@ UFSStoreState::kickReadQueue()
 }
 
 void
-UFSStoreState::queueRead(char *buf, size_t size, off_t offset, STRCB *callback, void *callback_data)
+UFSStoreState::queueRead(char *buf, size_t size, off_t offset, STRCB *callback_, void *callback_data_)
 {
     debugs(79, 3, "UFSStoreState::queueRead: queueing read");
     assert(opening);
@@ -470,8 +470,8 @@ UFSStoreState::queueRead(char *buf, size_t size, off_t offset, STRCB *callback,
     q->buf = buf;
     q->size = size;
     q->offset = offset;
-    q->callback = callback;
-    q->callback_data = cbdataReference(callback_data);
+    q->callback = callback_;
+    q->callback_data = cbdataReference(callback_data_);
     linklistPush(&pending_reads, q);
 }
 
index 20fe3679c5487d1eef56fd289a203cdc11a3b504..d994e97d0af1f209e79ad84a83e264f272261cc6 100644 (file)
@@ -785,7 +785,7 @@ RebuildState::getNextFile(sfileno * filn_p, int *size)
 }
 
 void
-RebuildState::next(void (callback)(void *cbdata), void *cbdata)
+RebuildState::next(void (aCallback)(void *aCallbackDataarg), void *aCallbackData)
 {
     /* for now, we don't cache at all */
     speed = 1;
@@ -794,7 +794,7 @@ RebuildState::next(void (callback)(void *cbdata), void *cbdata)
     while (!isDone() && currentEntry() == NULL)
         rebuildStep();
 
-    callback(cbdata);
+    aCallback(aCallbackData);
 }
 
 bool
index 334304506b1c1c209bf4aef7c454780906714c1f..226712b880aa4f8a9078a7c54d3b66c08c4ab7c1 100644 (file)
@@ -504,7 +504,7 @@ memInUse(mem_type type)
 
 /* ick */
 
-static void
+void
 memFree2K(void *p)
 {
     memFree(p, MEM_2K_BUF);
@@ -522,19 +522,19 @@ memFree8K(void *p)
     memFree(p, MEM_8K_BUF);
 }
 
-static void
+void
 memFree16K(void *p)
 {
     memFree(p, MEM_16K_BUF);
 }
 
-static void
+void
 memFree32K(void *p)
 {
     memFree(p, MEM_32K_BUF);
 }
 
-static void
+void
 memFree64K(void *p)
 {
     memFree(p, MEM_64K_BUF);
index 46f5ba37392cf10230b172a5bf5353f6d6058920..4493fa20035b1f94d97de8d4e76d5b3bd2bb6e3d 100644 (file)
@@ -87,7 +87,7 @@ SQUIDCEXTERN void clientdbInit(void);
 SQUIDCEXTERN void clientdbUpdate(const IpAddress &, log_type, protocol_t, size_t);
 
 SQUIDCEXTERN int clientdbCutoffDenied(const IpAddress &);
-SQUIDCEXTERN void clientdbDump(StoreEntry *);
+void clientdbDump(StoreEntry *);
 SQUIDCEXTERN void clientdbFreeMemory(void);
 
 SQUIDCEXTERN int clientdbEstablished(const IpAddress &, int);
@@ -472,8 +472,12 @@ SQUIDCEXTERN void *memAllocString(size_t net_size, size_t * gross_size);
 SQUIDCEXTERN void *memAllocBuf(size_t net_size, size_t * gross_size);
 SQUIDCEXTERN void *memReallocBuf(void *buf, size_t net_size, size_t * gross_size);
 SQUIDCEXTERN void memFree(void *, int type);
-SQUIDCEXTERN void memFree4K(void *);
-SQUIDCEXTERN void memFree8K(void *);
+void memFree2K(void *);
+void memFree4K(void *);
+void memFree8K(void *);
+void memFree16K(void *);
+void memFree32K(void *);
+void memFree64K(void *);
 SQUIDCEXTERN void memFreeString(size_t size, void *);
 SQUIDCEXTERN void memFreeBuf(size_t size, void *);
 SQUIDCEXTERN FREE *memFreeBufFunc(size_t size);