]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Cleanup: fix most 'unused parameter' warnings
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 1 Jan 2015 08:57:18 +0000 (00:57 -0800)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 1 Jan 2015 08:57:18 +0000 (00:57 -0800)
... and several bugs hidden by lack of this check:

* url_rewrite_timeout parser/dumper using wrong cf.data.pre
  parameter definition.

* url_rewrite_timeout parser/dumper using wrong object for
  state data.
  Global a Config object instead of parameter object.
  Preventing future use of multiple Config objects. There is
  more to be done as the Timeout value itself is not stored
  as part of the object apparently detailing the timeout.

* request_header_add directive dump() omitting directive
  name in mgr:config output.

* dead code as HTCP packet handlers for NOP, MON, SET

* mime icons download operation incorrectly initialized.
  was using the 'view' access parameter to set download
  access permission.

* peerCountHandleIcpReply() assertions testing validity
  after pointers already used. This would lead to segfault
  on errors, now leading to assertion logging.

Only the default built code was checked and updated at this
time. There are 62 known warnings still appearing due to
parameters being only used inside conditional code, possibly
more issues in code not enabled in this build and certainly
a lot more in the stubs and unit tests which were not checked.

133 files changed:
helpers/basic_auth/RADIUS/basic_radius_auth.cc
helpers/basic_auth/SASL/basic_sasl_auth.cc
helpers/basic_auth/SMB_LM/valid.cc
helpers/basic_auth/getpwnam/basic_getpwnam_auth.cc
helpers/external_acl/kerberos_ldap_group/support_ldap.cc
helpers/external_acl/kerberos_ldap_group/support_sasl.cc
helpers/ntlm_auth/smb_lm/ntlm_smb_lm_auth.cc
lib/ntlmauth/ntlmauth.cc
src/BodyPipe.cc
src/DiskIO/AIO/AIODiskFile.cc
src/DiskIO/AIO/AIODiskIOStrategy.cc
src/DiskIO/Blocking/BlockingFile.cc
src/DiskIO/DiskDaemon/DiskdFile.cc
src/DiskIO/DiskDaemon/diskd.cc
src/DiskIO/DiskFile.h
src/DiskIO/DiskIOStrategy.h
src/DiskIO/DiskThreads/CommIO.cc
src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc
src/DiskIO/IpcIo/IpcIoFile.cc
src/DiskIO/Mmapped/MmappedFile.cc
src/FwdState.cc
src/HttpHdrCc.cc
src/HttpHdrSc.cc
src/HttpHeader.cc
src/HttpRequest.cc
src/MemBuf.h
src/MemStore.cc
src/SBufStatsAction.cc
src/SquidConfig.h
src/StatHist.cc
src/Store.h
src/StoreIOState.cc
src/StoreMeta.cc
src/SwapDir.cc
src/Transients.cc
src/WinSvc.h
src/acl/Acl.cc
src/acl/DestinationDomain.cc
src/acl/Ip.cc
src/acl/Random.cc
src/acl/SourceDomain.cc
src/acl/Time.cc
src/adaptation/Initiator.cc
src/adaptation/ServiceGroups.h
src/adaptation/icap/ModXact.cc
src/adaptation/icap/Xaction.cc
src/adaptation/icap/Xaction.h
src/auth/Config.cc
src/auth/User.cc
src/auth/UserRequest.cc
src/auth/basic/Config.cc
src/auth/basic/UserRequest.cc
src/auth/digest/Config.cc
src/auth/digest/UserRequest.cc
src/auth/negotiate/Config.cc
src/auth/negotiate/UserRequest.cc
src/auth/ntlm/Config.cc
src/auth/ntlm/UserRequest.cc
src/base/AsyncCbdataCalls.h
src/base/AsyncJob.cc
src/cache_cf.cc
src/cbdata.cc
src/cf.data.depend
src/cf.data.pre
src/client_db.cc
src/client_side.cc
src/clients/FtpClient.cc
src/comm/ConnOpener.cc
src/comm/TcpAcceptor.cc
src/disk.cc
src/dns_internal.cc
src/errorpage.cc
src/eui/Eui64.cc
src/event.cc
src/fd.cc
src/fqdncache.cc
src/fs/rock/RockIoState.cc
src/fs/rock/RockStoreFileSystem.cc
src/fs/rock/RockSwapDir.cc
src/fs/ufs/RebuildState.cc
src/fs/ufs/UFSStoreState.cc
src/fs/ufs/UFSStrategy.cc
src/fs/ufs/UFSSwapDir.cc
src/gopher.cc
src/helper.cc
src/htcp.cc
src/http.cc
src/http/StatusLine.cc
src/icp_v2.cc
src/ident/Ident.cc
src/ip/Intercept.cc
src/ip/QosConfig.cc
src/ipc/Queue.cc
src/ipcache.cc
src/log/ModDaemon.cc
src/log/ModStdio.cc
src/log/ModSyslog.cc
src/log/ModUdp.cc
src/log/TcpLogger.cc
src/main.cc
src/mem/Pool.h
src/mem/PoolChunked.cc
src/mem/PoolMalloc.cc
src/mem/old_api.cc
src/mgr/Action.cc
src/mgr/Action.h
src/mgr/BasicActions.cc
src/mgr/Forwarder.cc
src/mgr/StoreToCommWriter.cc
src/mime.cc
src/multicast.cc
src/neighbors.cc
src/pconn.cc
src/send-announce.cc
src/servers/FtpServer.cc
src/snmp_core.cc
src/stat.cc
src/store.cc
src/store_client.cc
src/store_dir.cc
src/store_rebuild.cc
src/store_swapin.cc
src/tests/stub_debug.cc
src/tools.cc
src/tunnel.cc
src/unlinkd_daemon.cc
src/urn.cc
src/wccp.cc
src/wccp2.cc
src/whois.cc
tools/cachemgr.cc
tools/purge/socket.cc
tools/squidclient/squidclient.cc

index a7b82b4ac3e7ef08d4833163c6f105866ac1cbfc..3c2983b9ad0ddf082406b6dc3cf57a6f318b0fdd 100644 (file)
@@ -162,7 +162,7 @@ md5_calc(uint8_t out[16], void *in, size_t len)
  *    Receive and verify the result.
  */
 static int
-result_recv(uint32_t host, unsigned short udp_port, char *buffer, int length)
+result_recv(char *buffer, int length)
 {
     AUTH_HDR *auth;
     int totallen;
@@ -449,7 +449,7 @@ authenticate(int socket_fd, const char *username, const char *passwd)
             if (len < 0)
                 continue;
 
-            rc = result_recv(saremote.sin_addr.s_addr, saremote.sin_port, recv_buffer, len);
+            rc = result_recv(recv_buffer, len);
             if (rc == 0) {
                 SEND_OK("");
                 return;
index 1f68c7cf348dfaaed6c0d875284fb3dc7d9036dd..afe853bab173570f9387739990dd678fdc14c2ca 100644 (file)
@@ -49,7 +49,7 @@
 #define APP_NAME_SASL   "basic_sasl_auth"
 
 int
-main(int argc, char *argv[])
+main(int, char *argv[])
 {
     char line[HELPER_INPUT_BUFFER];
     char *username, *password;
index 59c1aa68d7c6883f41d620026ba6b6bb257c1ea6..73c86bac09369689ff0597830042c8cd25b2fcfc 100644 (file)
@@ -21,7 +21,7 @@
 
 // BACKUP is unused
 int
-Valid_User(char *USERNAME, char *PASSWORD, const char *SERVER, char *BACKUP, const char *DOMAIN)
+Valid_User(char *USERNAME, char *PASSWORD, const char *SERVER, char *, const char *DOMAIN)
 {
     const char *supportedDialects[] = {"PC NETWORK PROGRAM 1.0",
                                        "MICROSOFT NETWORKS 1.03",
index c78fa4f563211fcc5022756e9a5fada9037362b8..68bc11484cc283cbe709c8e03fea34e275cbfd16 100644 (file)
@@ -86,7 +86,7 @@ shadow_auth(char *user, char *passwd)
 #endif
 
 int
-main(int argc, char **argv)
+main(int, char **)
 {
     int auth = 0;
     char buf[HELPER_INPUT_BUFFER];
index c57687e4871dc3799d47a1c6c5828d0012e6b4fa..204946202e728940eeaedf36eb01c66f166f9322 100644 (file)
@@ -202,12 +202,7 @@ ldap_simple_rebind(
 static LDAP_REBIND_PROC ldap_sasl_rebind;
 
 static int
-ldap_sasl_rebind(
-    LDAP * ld,
-    LDAP_CONST char *url,
-    ber_tag_t request,
-    ber_int_t msgid,
-    void *params)
+ldap_sasl_rebind(LDAP *ld, LDAP_CONST char *, ber_tag_t, ber_int_t, void *params)
 {
     struct ldap_creds *cp = (struct ldap_creds *) params;
     return tool_sasl_bind(ld, cp->dn, cp->pw);
@@ -217,12 +212,7 @@ ldap_sasl_rebind(
 static LDAP_REBIND_PROC ldap_simple_rebind;
 
 static int
-ldap_simple_rebind(
-    LDAP * ld,
-    LDAP_CONST char *url,
-    ber_tag_t request,
-    ber_int_t msgid,
-    void *params)
+ldap_simple_rebind(LDAP * ld, LDAP_CONST char *, ber_tag_t, ber_int_t, void *params)
 {
 
     struct ldap_creds *cp = (struct ldap_creds *) params;
index e502360419d60d5ba72084935befac8a10063c1b..0d06b235b3dda5bbbc1bf92e6f8c22bb216e4650 100644 (file)
@@ -136,7 +136,7 @@ lutil_sasl_defaults(
 
 static int
 interaction(
-    unsigned flags,
+    unsigned,
     sasl_interact_t * interact,
     lutilSASLdefaults * defaults)
 {
index cb73c9b1bebadb7f2b2622f0b3f11a73a850f95f..759dab5bc42d2b7ef8ff223985fc44f90aecaa3a 100644 (file)
@@ -323,7 +323,7 @@ static char got_timeout = 0;
 /** signal handler to be invoked when the authentication operation
  * times out */
 void
-timeout_during_auth(int signum)
+timeout_during_auth(int)
 {
     dc_disconnect();
 }
index 280d45cdff4e74c40371fedfb8a532e4b180cb8c..8e3c1c626a871018cdf3662252cae5ce0cd9ef33 100644 (file)
@@ -201,7 +201,7 @@ ntlm_make_nonce(char *nonce)
  */
 void
 ntlm_make_challenge(ntlm_challenge *ch,
-                    const char *domain, const char *domain_controller_UNUSED,
+                    const char *domain, const char *,
                     const char *challenge_nonce, const int challenge_nonce_len,
                     const uint32_t flags)
 {
index 2807210ceeb8bac9a620839f288db23552baa264..11d8bea775131b62a46351785e275f657223b4bf 100644 (file)
@@ -27,10 +27,10 @@ public:
         size_t contentSize = bp->buf().contentSize();
         bp->consume(contentSize);
     }
-    virtual void noteBodyProductionEnded(BodyPipe::Pointer bp) {
+    virtual void noteBodyProductionEnded(BodyPipe::Pointer) {
         stopConsumingFrom(body_pipe);
     }
-    virtual void noteBodyProducerAborted(BodyPipe::Pointer bp) {
+    virtual void noteBodyProducerAborted(BodyPipe::Pointer) {
         stopConsumingFrom(body_pipe);
     }
     bool doneAll() const {return !body_pipe && AsyncJob::doneAll();}
index 81150b31dff98b0dccd5f8a240835b509c13a8a2..158ab08875733a546d66a31df6fa78b77f00f70f 100644 (file)
@@ -51,7 +51,7 @@ AIODiskFile::error(bool const &aBool)
 }
 
 void
-AIODiskFile::open(int flags, mode_t mode, RefCount<IORequestor> callback)
+AIODiskFile::open(int flags, mode_t, RefCount<IORequestor> callback)
 {
     /* Simulate async calls */
 #if _SQUID_WINDOWS_
index 0fc68c03e0ebe17bed10d74d2f0085aa1d43aed4..edcdfe708eac312d7c3f6dc65f8e03b55861310a 100644 (file)
@@ -184,7 +184,7 @@ AIODiskIOStrategy::init()
 }
 
 void
-AIODiskIOStrategy::statfs(StoreEntry & sentry)const
+AIODiskIOStrategy::statfs(StoreEntry &const
 {}
 
 ConfigOption *
index 5ee6162e030a612b268b4a8ccf19889845c7be92..dadea8f2c96f1ffc43913033f96bf1e5ed1e9875 100644 (file)
@@ -36,7 +36,7 @@ BlockingFile::~BlockingFile()
 }
 
 void
-BlockingFile::open(int flags, mode_t mode, RefCount<IORequestor> callback)
+BlockingFile::open(int flags, mode_t, RefCount<IORequestor> callback)
 {
     /* Simulate async calls */
     fd = file_open(path_ , flags);
index 36d3ecf2432ee7ca0437ce54fdf4f934d5db8a91..b996b13635438014b7e27a3a4b54f2174eca22c8 100644 (file)
@@ -50,7 +50,7 @@ DiskdFile::~DiskdFile()
 }
 
 void
-DiskdFile::open(int flags, mode_t aMode, RefCount< IORequestor > callback)
+DiskdFile::open(int flags, mode_t, RefCount<IORequestor> callback)
 {
     debugs(79, 3, "DiskdFile::open: " << this << " opening for " << callback.getRaw());
     assert(ioRequestor.getRaw() == NULL);
@@ -81,7 +81,7 @@ DiskdFile::open(int flags, mode_t aMode, RefCount< IORequestor > callback)
 }
 
 void
-DiskdFile::create(int flags, mode_t aMode, RefCount< IORequestor > callback)
+DiskdFile::create(int flags, mode_t, RefCount<IORequestor> callback)
 {
     debugs(79, 3, "DiskdFile::create: " << this << " creating for " << callback.getRaw());
     assert (ioRequestor.getRaw() == NULL);
index e6dc654170ae30fc6acd1e17a88010b97d0e97d9..0e2c645a1dc7946aa02abdf72f1ff98a568b577e 100644 (file)
@@ -51,7 +51,7 @@ static char *shmbuf;
 static int DebugLevel = 0;
 
 static int
-do_open(diomsg * r, int len, const char *buf)
+do_open(diomsg * r, int, const char *buf)
 {
     int fd;
     file_state *fs;
@@ -85,7 +85,7 @@ do_open(diomsg * r, int len, const char *buf)
 }
 
 static int
-do_close(diomsg * r, int len)
+do_close(diomsg * r, int)
 {
     int fd;
     file_state *fs;
@@ -115,7 +115,7 @@ do_close(diomsg * r, int len)
 }
 
 static int
-do_read(diomsg * r, int len, char *buf)
+do_read(diomsg * r, int, char *buf)
 {
     int x;
     int readlen = r->size;
@@ -165,7 +165,7 @@ do_read(diomsg * r, int len, char *buf)
 }
 
 static int
-do_write(diomsg * r, int len, const char *buf)
+do_write(diomsg * r, int, const char *buf)
 {
     int wrtlen = r->size;
     int x;
@@ -211,7 +211,7 @@ do_write(diomsg * r, int len, const char *buf)
 }
 
 static int
-do_unlink(diomsg * r, int len, const char *buf)
+do_unlink(diomsg * r, int, const char *buf)
 {
     if (unlink(buf) < 0) {
         DEBUG(1) {
@@ -295,11 +295,8 @@ fsHash(const void *key, unsigned int n)
     return (*k & (--n));
 }
 
-SQUIDCEXTERN {
-    static void
-    alarm_handler(int sig) {
-        (void) 0;
-    }
+extern "C" {
+    static void alarm_handler(int) {}
 };
 
 int
index 2fdfa73434996570e2ba957233711898d34ca7f8..9119610753ad3ba79248c851863c2e84795efbdd 100644 (file)
@@ -39,7 +39,7 @@ public:
     typedef RefCount<DiskFile> Pointer;
 
     /// notes supported configuration options; kids must call this first
-    virtual void configure(const Config &cfg) {}
+    virtual void configure(const Config &) {}
 
     virtual void open(int flags, mode_t mode, RefCount<IORequestor> callback) = 0;
     virtual void create(int flags, mode_t mode, RefCount<IORequestor> callback) = 0;
index e958b63531018631782cc17e7bc8de5123491a6a..5bc4a568053b5560c39a4ca2b8471af32f6015e0 100644 (file)
@@ -47,10 +47,10 @@ public:
     virtual void init() {}
 
     /** cachemgr output on the IO instance stats */
-    virtual void statfs(StoreEntry & sentry)const {}
+    virtual void statfs(StoreEntry &const {}
 
     /** module specific options */
-    virtual ConfigOption *getOptionTree() const { return NULL;}
+    virtual ConfigOption *getOptionTree() const {return NULL;}
 };
 
 /* Because we need the DiskFile definition for newFile. */
@@ -72,13 +72,13 @@ public:
 
     virtual bool unlinkdUseful() const { return io->unlinkdUseful(); }
 
-    virtual void unlinkFile (char const *path) { io->unlinkFile(path); }
+    virtual void unlinkFile(char const *path) { io->unlinkFile(path); }
 
     virtual int callback() { return io->callback(); }
 
     virtual void init() { io->init(); }
 
-    virtual void statfs(StoreEntry & sentry)const { io->statfs(sentry); }
+    virtual void statfs(StoreEntry & sentry) const { io->statfs(sentry); }
 
     virtual ConfigOption *getOptionTree() const { return io->getOptionTree(); }
 
index 34b87832b40a327975add9151300ec2419887e19..b0be0fbd4055c2e0ba67ed59abdcaa097feb8789 100644 (file)
@@ -59,7 +59,7 @@ CommIO::FlushPipe()
 }
 
 void
-CommIO::NULLFDHandler(int fd, void *data)
+CommIO::NULLFDHandler(int fd, void *)
 {
     FlushPipe();
     Comm::SetSelect(fd, COMM_SELECT_READ, NULLFDHandler, NULL, 0);
index 1f416ea1523609d1b4d4be821904b10f59b5875a..371bf3970f70b3f7d46d7b7fd4f97563f9703319 100644 (file)
@@ -135,7 +135,7 @@ DiskThreadsDiskFile::OpenDone(int fd, void *cbdata, const char *buf, int aio_ret
 }
 
 void
-DiskThreadsDiskFile::openDone(int unused, const char *unused2, int anFD, int errflag)
+DiskThreadsDiskFile::openDone(int, const char *, int anFD, int errflag)
 {
     debugs(79, 3, "DiskThreadsDiskFile::openDone: FD " << anFD << ", errflag " << errflag);
     --Opening_FD;
index 85a983d92e99494774490f5a70e945f8f390e2af..9ea7fae5448a1f73c87c0d083bb14af62fae14dd 100644 (file)
@@ -890,7 +890,7 @@ IpcIoFile::DiskerHandleRequest(const int workerId, IpcIoMsg &ipcIo)
 }
 
 static bool
-DiskerOpen(const SBuf &path, int flags, mode_t mode)
+DiskerOpen(const SBuf &path, int flags, mode_t)
 {
     assert(TheFile < 0);
 
index 4ed22d403303be4a3f7452ca6b42c07a3ed7ec53..e473a549e34f9fd3bd2d899170ddb01fb6518daf 100644 (file)
@@ -69,7 +69,7 @@ MmappedFile::~MmappedFile()
 
 // XXX: almost a copy of BlockingFile::open
 void
-MmappedFile::open(int flags, mode_t mode, RefCount<IORequestor> callback)
+MmappedFile::open(int flags, mode_t, RefCount<IORequestor> callback)
 {
     assert(fd < 0);
 
index d74d62661513dbe51521ad46060fae1db6e87297..6554f0d3388c44433bc46cb31bebf555d7e76cc6 100644 (file)
@@ -503,7 +503,7 @@ FwdState::complete()
 /**** CALLBACK WRAPPERS ************************************************************/
 
 static void
-fwdPeerSelectionCompleteWrapper(Comm::ConnectionList * unused, ErrorState *err, void *data)
+fwdPeerSelectionCompleteWrapper(Comm::ConnectionList *, ErrorState *err, void *data)
 {
     FwdState *fwd = (FwdState *) data;
     if (err)
index f85909ed324a404d49a6d95491614a86913ca9fc..b8d21ca77f0fccdb8466b343a117f82a1192e2a8 100644 (file)
@@ -299,7 +299,7 @@ httpHdrCcUpdateStats(const HttpHdrCc * cc, StatHist * hist)
 }
 
 void
-httpHdrCcStatDumper(StoreEntry * sentry, int idx, double val, double size, int count)
+httpHdrCcStatDumper(StoreEntry * sentry, int, double val, double, int count)
 {
     extern const HttpHeaderStat *dump_stat; /* argh! */
     const int id = (int) val;
index 0322ebe4050c59ee51a248925f6862d46157e990..f23014b65a4d447915e71d222d0fb49f377c86b9 100644 (file)
@@ -303,7 +303,7 @@ HttpHdrSc::updateStats(StatHist * hist) const
 }
 
 void
-httpHdrScTargetStatDumper(StoreEntry * sentry, int idx, double val, double size, int count)
+httpHdrScTargetStatDumper(StoreEntry * sentry, int, double val, double, int count)
 {
     extern const HttpHeaderStat *dump_stat;     /* argh! */
     const int id = (int) val;
@@ -316,7 +316,7 @@ httpHdrScTargetStatDumper(StoreEntry * sentry, int idx, double val, double size,
 }
 
 void
-httpHdrScStatDumper(StoreEntry * sentry, int idx, double val, double size, int count)
+httpHdrScStatDumper(StoreEntry * sentry, int, double val, double, int count)
 {
     extern const HttpHeaderStat *dump_stat; /* argh! */
     const int id = (int) val;
index 9a8b92e8a0d939758b33cec4a1a5006637d353d2..7913511518e99fe49e94b3e47c84a993272bbe97 100644 (file)
@@ -1763,7 +1763,7 @@ extern const HttpHeaderStat *dump_stat;     /* argh! */
 const HttpHeaderStat *dump_stat = NULL;
 
 void
-httpHeaderFieldStatDumper(StoreEntry * sentry, int idx, double val, double size, int count)
+httpHeaderFieldStatDumper(StoreEntry * sentry, int, double val, double, int count)
 {
     const int id = (int) val;
     const int valid_id = id >= 0 && id < HDR_ENUM_END;
@@ -1780,7 +1780,7 @@ httpHeaderFieldStatDumper(StoreEntry * sentry, int idx, double val, double size,
 }
 
 static void
-httpHeaderFldsPerHdrDumper(StoreEntry * sentry, int idx, double val, double size, int count)
+httpHeaderFldsPerHdrDumper(StoreEntry * sentry, int idx, double val, double, int count)
 {
     if (count)
         storeAppendPrintf(sentry, "%2d\t %5d\t %5d\t %6.2f\n",
index 851b1aee482660abde081683da080634835b9ffc..4fe88b23a626bb763dc293fcc00734d9f67043fb 100644 (file)
@@ -522,7 +522,7 @@ void HttpRequest::packFirstLineInto(Packer * p, bool full_uri) const
  * along with this request
  */
 bool
-HttpRequest::expectingBody(const HttpRequestMethod& unused, int64_t& theSize) const
+HttpRequest::expectingBody(const HttpRequestMethod &, int64_t &theSize) const
 {
     bool expectBody = false;
 
index b37495a91c9f8bb49757429093715f6644c1f483..63d555d2417856611d2f184d270df9101f2dde19 100644 (file)
@@ -120,9 +120,9 @@ private:
      * private copy constructor and assignment operator generates
      * compiler errors if someone tries to copy/assign a MemBuf
      */
-    MemBuf(const MemBuf& m) {assert(false);};
+    MemBuf(const MemBuf &) {assert(false);}
 
-    MemBuf& operator= (const MemBuf& m) {assert(false); return *this;};
+    MemBuf& operator= (const MemBuf &) {assert(false); return *this;}
 
     void grow(mb_size_t min_cap);
 
index ae9d55f48fb59f904fd3b3a8ce726099d4bf873b..bfd2a1e6b29b8301ffdbb0393f022512020bdc9b 100644 (file)
@@ -221,7 +221,7 @@ MemStore::get(const cache_key *key)
 }
 
 void
-MemStore::get(String const key, STOREGETCLIENT aCallback, void *aCallbackData)
+MemStore::get(String const, STOREGETCLIENT, void *)
 {
     // XXX: not needed but Store parent forces us to implement this
     fatal("MemStore::get(key,callback,data) should not be called");
index 1e7551fe233450565c63842d59c1572094d5c164..efa4adc3c23e0353f930cfb9d4e747b7c997ad26 100644 (file)
@@ -43,7 +43,7 @@ SBufStatsAction::collect()
 }
 
 static void
-statHistSBufDumper(StoreEntry * sentry, int idx, double val, double size, int count)
+statHistSBufDumper(StoreEntry * sentry, int, double val, double size, int count)
 {
     if (count == 0)
         return;
index 72f0237ac87b82770bd0d284ab98b3ac82ceb50d..5955ee98041f27fcec07e0a5627652fce8c6e5d1 100644 (file)
@@ -529,7 +529,7 @@ public:
 
     char *redirector_extras;
 
-    struct {
+    struct UrlHelperTimeout {
         int action;
         char *response;
     } onUrlRewriteTimeout;
index d9cbbf73f5c5fc16c0cd2d7b64e732b576a286f4..8e35f999e874a976f9ad1d3b4b0f5d852423d617 100644 (file)
@@ -236,7 +236,7 @@ StatHist::enumInit(unsigned int last_enum)
 }
 
 void
-statHistEnumDumper(StoreEntry * sentry, int idx, double val, double size, int count)
+statHistEnumDumper(StoreEntry * sentry, int idx, double val, double, int count)
 {
     if (count)
         storeAppendPrintf(sentry, "%2d\t %5d\t %5d\n",
@@ -244,7 +244,7 @@ statHistEnumDumper(StoreEntry * sentry, int idx, double val, double size, int co
 }
 
 void
-statHistIntDumper(StoreEntry * sentry, int idx, double val, double size, int count)
+statHistIntDumper(StoreEntry * sentry, int, double val, double, int count)
 {
     if (count)
         storeAppendPrintf(sentry, "%9d\t%9d\n", (int) val, count);
index 3ca03c616846274a876cbd1704f75246d39d7c19..225bd51848445abfc81e7ae205ff6bb7b73cb751 100644 (file)
@@ -259,7 +259,7 @@ public:
 
     bool isEmpty () const {return true;}
 
-    virtual size_t bytesWanted(Range<size_t> const aRange, bool ignoreDelayPool = false) const { return aRange.end; }
+    virtual size_t bytesWanted(Range<size_t> const aRange, bool) const { return aRange.end; }
 
     void operator delete(void *address);
     void complete() {}
@@ -270,7 +270,7 @@ private:
     char const *getSerialisedMetaData();
     virtual bool mayStartSwapOut() { return false; }
 
-    void trimMemory(const bool preserveSwappable) {}
+    void trimMemory(const bool) {}
 
     static NullStoreEntry _instance;
 };
@@ -363,71 +363,71 @@ public:
     virtual void reference(StoreEntry &) = 0;   /* Reference this object */
 
     /// Undo reference(), returning false iff idle e should be destroyed
-    virtual bool dereference(StoreEntry &e, bool wantsLocalMemory) = 0;
+    virtual bool dereference(StoreEntry &, bool wantsLocalMemory) = 0;
 
     virtual void maintain() = 0; /* perform regular maintenance should be private and self registered ... */
 
     // XXX: This method belongs to Store::Root/StoreController, but it is here
     // to avoid casting Root() to StoreController until Root() API is fixed.
     /// informs stores that this entry will be eventually unlinked
-    virtual void markForUnlink(StoreEntry &e) {}
+    virtual void markForUnlink(StoreEntry &) {}
 
     // XXX: This method belongs to Store::Root/StoreController, but it is here
     // because test cases use non-StoreController derivatives as Root
     /// called when the entry is no longer needed by any transaction
-    virtual void handleIdleEntry(StoreEntry &e) {}
+    virtual void handleIdleEntry(StoreEntry &) {}
 
     // XXX: This method belongs to Store::Root/StoreController, but it is here
     // because test cases use non-StoreController derivatives as Root
     /// called to get rid of no longer needed entry data in RAM, if any
-    virtual void memoryOut(StoreEntry &e, const bool preserveSwappable) {}
+    virtual void memoryOut(StoreEntry &, const bool /*preserveSwappable*/) {}
 
     // XXX: This method belongs to Store::Root/StoreController, but it is here
     // to avoid casting Root() to StoreController until Root() API is fixed.
     /// makes the entry available for collapsing future requests
-    virtual void allowCollapsing(StoreEntry *e, const RequestFlags &reqFlags, const HttpRequestMethod &reqMethod) {}
+    virtual void allowCollapsing(StoreEntry *, const RequestFlags &, const HttpRequestMethod &) {}
 
     // XXX: This method belongs to Store::Root/StoreController, but it is here
     // to avoid casting Root() to StoreController until Root() API is fixed.
     /// marks the entry completed for collapsed requests
-    virtual void transientsCompleteWriting(StoreEntry &e) {}
+    virtual void transientsCompleteWriting(StoreEntry &) {}
 
     // XXX: This method belongs to Store::Root/StoreController, but it is here
     // to avoid casting Root() to StoreController until Root() API is fixed.
     /// Update local intransit entry after changes made by appending worker.
-    virtual void syncCollapsed(const sfileno xitIndex) {}
+    virtual void syncCollapsed(const sfileno) {}
 
     // XXX: This method belongs to Store::Root/StoreController, but it is here
     // to avoid casting Root() to StoreController until Root() API is fixed.
     /// calls Root().transients->abandon() if transients are tracked
-    virtual void transientsAbandon(StoreEntry &e) {}
+    virtual void transientsAbandon(StoreEntry &) {}
 
     // XXX: This method belongs to Store::Root/StoreController, but it is here
     // to avoid casting Root() to StoreController until Root() API is fixed.
     /// number of the transient entry readers some time ago
-    virtual int transientReaders(const StoreEntry &e) const { return 0; }
+    virtual int transientReaders(const StoreEntry &) const { return 0; }
 
     // XXX: This method belongs to Store::Root/StoreController, but it is here
     // to avoid casting Root() to StoreController until Root() API is fixed.
     /// disassociates the entry from the intransit table
-    virtual void transientsDisconnect(MemObject &mem_obj) {}
+    virtual void transientsDisconnect(MemObject &) {}
 
     // XXX: This method belongs to Store::Root/StoreController, but it is here
     // to avoid casting Root() to StoreController until Root() API is fixed.
     /// removes the entry from the memory cache
-    virtual void memoryUnlink(StoreEntry &e) {}
+    virtual void memoryUnlink(StoreEntry &) {}
 
     // XXX: This method belongs to Store::Root/StoreController, but it is here
     // to avoid casting Root() to StoreController until Root() API is fixed.
     /// disassociates the entry from the memory cache, preserving cached data
-    virtual void memoryDisconnect(StoreEntry &e) {}
+    virtual void memoryDisconnect(StoreEntry &) {}
 
     /// If the entry is not found, return false. Otherwise, return true after
     /// tying the entry to this cache and setting inSync to updateCollapsed().
-    virtual bool anchorCollapsed(StoreEntry &collapsed, bool &inSync) { return false; }
+    virtual bool anchorCollapsed(StoreEntry &, bool &/*inSync*/) { return false; }
 
     /// update a local collapsed entry with fresh info from this cache (if any)
-    virtual bool updateCollapsed(StoreEntry &collapsed) { return false; }
+    virtual bool updateCollapsed(StoreEntry &) { return false; }
 
 private:
     static RefCount<Store> CurrentRoot;
index 979f0202aabf0370472d178ef8d5a248dc100377..2871a7ec41c0ebfb4cbd434953973b573a6d0ff0 100644 (file)
 #include "StoreIOState.h"
 
 void *
-StoreIOState::operator new (size_t amount)
+StoreIOState::operator new (size_t)
 {
     assert(0);
     return (void *)1;
 }
 
 void
-StoreIOState::operator delete (void *address) {assert (0);}
+StoreIOState::operator delete (void *)
+{
+    assert(0);
+}
 
 StoreIOState::StoreIOState() :
     swap_dirn(-1), swap_filen(-1), e(NULL), mode(O_BINARY),
index ac5a39a868b8912a92a4e6ba965f26928a2a1e95..b8a030d657d270ea300c665f1f14b20370906baf 100644 (file)
@@ -157,7 +157,7 @@ StoreMeta::Add(StoreMeta **tail, StoreMeta *aNode)
 }
 
 bool
-StoreMeta::checkConsistency(StoreEntry *e) const
+StoreMeta::checkConsistency(StoreEntry *) const
 {
     switch (getType()) {
 
index 51b5bc73a5fa676bbca6dead5675124d9923bbdd..5d53be0757c2621f740e804aa64bc7ed50b4a197 100644 (file)
@@ -208,7 +208,7 @@ void
 SwapDir::writeCleanDone() {}
 
 void
-SwapDir::logEntry(const StoreEntry & e, int op) const {}
+SwapDir::logEntry(const StoreEntry &, int) const {}
 
 char const *
 SwapDir::type() const
@@ -297,7 +297,7 @@ SwapDir::dumpOptions(StoreEntry * entry) const
 }
 
 bool
-SwapDir::optionReadOnlyParse(char const *option, const char *value, int isaReconfig)
+SwapDir::optionReadOnlyParse(char const *option, const char *value, int)
 {
     if (strcmp(option, "no-store") != 0 && strcmp(option, "read-only") != 0)
         return false;
@@ -370,13 +370,13 @@ SwapDir::optionObjectSizeDump(StoreEntry * e) const
 
 // some SwapDirs may maintain their indexes and be able to lookup an entry key
 StoreEntry *
-SwapDir::get(const cache_key *key)
+SwapDir::get(const cache_key *)
 {
     return NULL;
 }
 
 void
-SwapDir::get(String const key, STOREGETCLIENT aCallback, void *aCallbackData)
+SwapDir::get(String const, STOREGETCLIENT, void *)
 {
     fatal("not implemented");
 }
index 740de65d13aa0bb42810d08acc3323c0698cb0fe..d15dc85a85a1fab16a50e3ede256323d91237b15 100644 (file)
@@ -213,7 +213,7 @@ Transients::copyFromShm(const sfileno index)
 }
 
 void
-Transients::get(String const key, STOREGETCLIENT aCallback, void *aCallbackData)
+Transients::get(String const, STOREGETCLIENT, void *)
 {
     // XXX: not needed but Store parent forces us to implement this
     fatal("Transients::get(key,callback,data) should not be called");
@@ -297,7 +297,7 @@ Transients::copyToShm(const StoreEntry &e, const sfileno index,
 }
 
 void
-Transients::noteFreeMapSlice(const Ipc::StoreMapSliceId sliceId)
+Transients::noteFreeMapSlice(const Ipc::StoreMapSliceId)
 {
     // TODO: we should probably find the entry being deleted and abort it
 }
index 340deda987ddb3e68fc58fe1e99479fa4e554aad..9d9e8f19d32386f813e5ebd7da7af7eaee0e064f 100644 (file)
@@ -17,8 +17,8 @@ void WIN32_SetServiceCommandLine(void);
 void WIN32_InstallService(void);
 void WIN32_RemoveService(void);
 #else /* _SQUID_WINDOWS_ */
-inline int WIN32_Subsystem_Init(int *foo, char ***bar) {return 0; } /* NOP */
-inline void WIN32_sendSignal(int foo) { return; } /* NOP */
+inline int WIN32_Subsystem_Init(int *, char ***) {return 0;} /* NOP */
+inline void WIN32_sendSignal(int) {return;} /* NOP */
 inline void WIN32_SetServiceCommandLine(void) {} /* NOP */
 inline void WIN32_InstallService(void) {} /* NOP */
 inline  void WIN32_RemoveService(void) {} /* NOP */
index be538c67ccf0c1ce5e8d9b147847e7e4ef67d9c8..75ed78aa08a1ddfe95be85089c366e369e348d02 100644 (file)
@@ -79,14 +79,14 @@ ACLFlags::flagsStr() const
 }
 
 void *
-ACL::operator new (size_t byteCount)
+ACL::operator new (size_t)
 {
     fatal ("unusable ACL::new");
     return (void *)1;
 }
 
 void
-ACL::operator delete (void *address)
+ACL::operator delete (void *)
 {
     fatal ("unusable ACL::delete");
 }
@@ -297,7 +297,7 @@ ACL::isProxyAuth() const
 /* ACL result caching routines */
 
 int
-ACL::matchForCache(ACLChecklist *checklist)
+ACL::matchForCache(ACLChecklist *)
 {
     /* This is a fatal to ensure that cacheMatchAcl calls are _only_
      * made for supported acl types */
index 1216fd84df9c10d383ecb1a2ed047a5a77fafd3c..4a782386f550056e00ba4fa6590888e6b607e247 100644 (file)
@@ -33,7 +33,7 @@ DestinationDomainLookup::checkForAsync(ACLChecklist *cl) const
 }
 
 void
-DestinationDomainLookup::LookupDone(const char *fqdn, const DnsLookupDetails &details, void *data)
+DestinationDomainLookup::LookupDone(const char *, const DnsLookupDetails &details, void *data)
 {
     ACLFilledChecklist *checklist = Filled((ACLChecklist*)data);
     checklist->markDestinationDomainChecked();
index aded60f1e42127dcc70b5a9a7e6eb3d4f8173f80..f43b018b4d70456b15dd5d5f4e1c3667b59a1c43 100644 (file)
 #include "wordlist.h"
 
 void *
-ACLIP::operator new (size_t byteCount)
+ACLIP::operator new (size_t)
 {
     fatal ("ACLIP::operator new: unused");
     return (void *)1;
 }
 
 void
-ACLIP::operator delete (void *address)
+ACLIP::operator delete (void *)
 {
     fatal ("ACLIP::operator delete: unused");
 }
index 1cdc09d9d8d574117953ecc549bca7b386ba9ef0..9451b6d9496ed6f9163fdf9ffa08e53c3424e864 100644 (file)
@@ -102,7 +102,7 @@ ACLRandom::parse()
 }
 
 int
-ACLRandom::match(ACLChecklist *cl)
+ACLRandom::match(ACLChecklist *)
 {
     // make up the random value
     double random = ((double)rand() / (double)RAND_MAX);
index 9354a2ed5d1e2e2db7e2596bd14618b2a97abff2..ad2e5bf788ed57b095c4d78d83d249b0296de2d0 100644 (file)
@@ -31,7 +31,7 @@ SourceDomainLookup::checkForAsync(ACLChecklist *checklist) const
 }
 
 void
-SourceDomainLookup::LookupDone(const char *fqdn, const DnsLookupDetails &details, void *data)
+SourceDomainLookup::LookupDone(const char *, const DnsLookupDetails &details, void *data)
 {
     ACLFilledChecklist *checklist = Filled((ACLChecklist*)data);
     checklist->markSourceDomainChecked();
index bc2911dbfd22dc5727441c849e1277ffeb79e8d0..66b5632ec3d495514804c56cf0a54b71ba985e79 100644 (file)
@@ -14,9 +14,9 @@
 #include "SquidTime.h"
 
 int
-ACLTimeStrategy::match (ACLData<MatchType> * &data, ACLFilledChecklist *checklist, ACLFlags &)
+ACLTimeStrategy::match(ACLData<MatchType> * &data, ACLFilledChecklist *, ACLFlags &)
 {
-    return data->match (squid_curtime);
+    return data->match(squid_curtime);
 }
 
 ACLTimeStrategy *
index 30579a80f8cffc109b40dd7ba3c8c34a6a919005..8790b3ab839af5d61d202c42c216e9d4dd15d4a9 100644 (file)
@@ -14,7 +14,7 @@
 #include "base/AsyncJobCalls.h"
 
 void
-Adaptation::Initiator::noteAdaptationAclCheckDone(Adaptation::ServiceGroupPointer group)
+Adaptation::Initiator::noteAdaptationAclCheckDone(Adaptation::ServiceGroupPointer)
 {
     Must(false);
 }
index 64a361e7f4465d0414069f2aa0a0b79c94392990..f7ddf25e37a2ba0904beb844904d8d2feac5d0a8 100644 (file)
@@ -81,7 +81,7 @@ public:
 
 protected:
     virtual bool replace(Pos &pos) const { return has(++pos); }
-    virtual bool advance(Pos &pos) const { return false; }
+    virtual bool advance(Pos &) const { return false; }
 };
 
 // corner case: a group consisting of one service
@@ -91,8 +91,8 @@ public:
     SingleService(const String &aServiceKey);
 
 protected:
-    virtual bool replace(Pos &pos) const { return false; }
-    virtual bool advance(Pos &pos) const { return false; }
+    virtual bool replace(Pos &) const { return false; }
+    virtual bool advance(Pos &) const { return false; }
 };
 
 /// a group of services that must be used one after another
@@ -102,7 +102,7 @@ public:
     ServiceChain();
 
 protected:
-    virtual bool replace(Pos &pos) const { return false; }
+    virtual bool replace(Pos &) const { return false; }
     virtual bool advance(Pos &pos) const { return has(++pos); }
 };
 
index 50a1345e80e5d3236fa91681ff1d51dbc8131fe9..ce191707006116361f1df90ca9058b6d82e1c2b5 100644 (file)
@@ -1680,7 +1680,7 @@ void Adaptation::Icap::ModXact::decideOnRetries()
 // structures were initialized. This is not the case when there is no body
 // or the body is known to be empty, because the virgin message will lack a
 // body_pipe. So we handle preview of null-body and zero-size bodies here.
-void Adaptation::Icap::ModXact::finishNullOrEmptyBodyPreview(MemBuf &buf)
+void Adaptation::Icap::ModXact::finishNullOrEmptyBodyPreview(MemBuf &)
 {
     Must(!virginBodyWriting.active()); // one reason we handle it here
     Must(!virgin.body_pipe);          // another reason we handle it here
index cb37fbc5c5eab8f40947cca7d88e71353c5a956a..ef3f6af389697f7fa314524200ab45e019caa883 100644 (file)
@@ -305,7 +305,7 @@ void Adaptation::Icap::Xaction::noteCommWrote(const CommIoCbParams &io)
 }
 
 // communication timeout with the ICAP service
-void Adaptation::Icap::Xaction::noteCommTimedout(const CommTimeoutCbParams &io)
+void Adaptation::Icap::Xaction::noteCommTimedout(const CommTimeoutCbParams &)
 {
     handleCommTimedout();
 }
@@ -328,7 +328,7 @@ void Adaptation::Icap::Xaction::handleCommTimedout()
 }
 
 // unexpected connection close while talking to the ICAP service
-void Adaptation::Icap::Xaction::noteCommClosed(const CommCloseCbParams &io)
+void Adaptation::Icap::Xaction::noteCommClosed(const CommCloseCbParams &)
 {
     closer = NULL;
     handleCommClosed();
@@ -629,7 +629,7 @@ void Adaptation::Icap::Xaction::fillDoneStatus(MemBuf &buf) const
         buf.Printf("Stopped");
 }
 
-bool Adaptation::Icap::Xaction::fillVirginHttpHeader(MemBuf &buf) const
+bool Adaptation::Icap::Xaction::fillVirginHttpHeader(MemBuf &) const
 {
     return false;
 }
index 6c607c2f430b22bad3fbdd48506858fb593b2bd2..34ac27149472789dcbf193a94fd377de1350e5fe 100644 (file)
@@ -71,7 +71,7 @@ protected:
     virtual void handleCommClosed();
 
     /// record error detail if possible
-    virtual void detailError(int errDetail) {}
+    virtual void detailError(int) {}
 
     void openConnection();
     void closeConnection();
index 7270e368c6e19a47febfa9090da0d1feed588662..732f802bc55d2ade4dfcc1adff819170fd5ddd7b 100644 (file)
@@ -71,7 +71,7 @@ Auth::Config::registerWithCacheManager(void)
 {}
 
 void
-Auth::Config::parse(Auth::Config * scheme, int n_configured, char *param_str)
+Auth::Config::parse(Auth::Config * scheme, int, char *param_str)
 {
     if (strcmp(param_str, "program") == 0) {
         if (authenticateProgram)
index 6f56caa91f0ac90200fb4e710c55a5b0d280865f..b91fe1c0e8350c0874bb71a711b1f5c3ba337422 100644 (file)
@@ -172,7 +172,7 @@ Auth::User::CachedACLsReset()
 }
 
 void
-Auth::User::cacheCleanup(void *datanotused)
+Auth::User::cacheCleanup(void *)
 {
     /*
      * We walk the hash by username as that is the unique key we use.
index 732511f74c42eaf55c4670918e8fdf9fa19c038e..0c3b2f1654fd2ba38193db6d46e92e8baa9e5929 100644 (file)
@@ -76,14 +76,14 @@ Auth::UserRequest::valid() const
 }
 
 void *
-Auth::UserRequest::operator new (size_t byteCount)
+Auth::UserRequest::operator new (size_t)
 {
     fatal("Auth::UserRequest not directly allocatable\n");
     return (void *)1;
 }
 
 void
-Auth::UserRequest::operator delete (void *address)
+Auth::UserRequest::operator delete (void *)
 {
     fatal("Auth::UserRequest child failed to override operator delete\n");
 }
@@ -193,11 +193,11 @@ Auth::UserRequest::direction()
 }
 
 void
-Auth::UserRequest::addAuthenticationInfoHeader(HttpReply * rep, int accelerated)
+Auth::UserRequest::addAuthenticationInfoHeader(HttpReply *, int)
 {}
 
 void
-Auth::UserRequest::addAuthenticationInfoTrailer(HttpReply * rep, int accelerated)
+Auth::UserRequest::addAuthenticationInfoTrailer(HttpReply *, int)
 {}
 
 void
@@ -534,7 +534,7 @@ authenticateFixHeader(HttpReply * rep, Auth::UserRequest::Pointer auth_user_requ
 /* call the active auth module and allow it to add a trailer to the request */
 // TODO remove wrapper
 void
-authenticateAddTrailer(HttpReply * rep, Auth::UserRequest::Pointer auth_user_request, HttpRequest * request, int accelerated)
+authenticateAddTrailer(HttpReply * rep, Auth::UserRequest::Pointer auth_user_request, HttpRequest *, int accelerated)
 {
     if (auth_user_request != NULL)
         auth_user_request->addAuthenticationInfoTrailer(rep, accelerated);
index a0514e1b6c4416d038a310088aebe5261d2cfe67..6936818c9523b3192985ca387034424d2d382f4e 100644 (file)
@@ -72,7 +72,7 @@ Auth::Basic::Config::type() const
 }
 
 void
-Auth::Basic::Config::fixHeader(Auth::UserRequest::Pointer auth_user_request, HttpReply *rep, http_hdr_type hdrType, HttpRequest * request)
+Auth::Basic::Config::fixHeader(Auth::UserRequest::Pointer, HttpReply *rep, http_hdr_type hdrType, HttpRequest *)
 {
     if (authenticateProgram) {
         debugs(29, 9, "Sending type:" << hdrType << " header: 'Basic realm=\"" << realm << "\"'");
@@ -277,7 +277,7 @@ Auth::Basic::Config::decode(char const *proxy_auth, const char *aRequestRealm)
 /** Initialize helpers and the like for this auth scheme. Called AFTER parsing the
  * config file */
 void
-Auth::Basic::Config::init(Auth::Config * schemeCfg)
+Auth::Basic::Config::init(Auth::Config *)
 {
     if (authenticateProgram) {
         authbasic_initialised = 1;
index 8f48da299598795eda2d58abe58163b6295647d7..f6b1e83e6e7d910749430e436828ff18eb4158e1 100644 (file)
@@ -50,7 +50,7 @@ Auth::Basic::UserRequest::credentialsStr()
 /* log a basic user in
  */
 void
-Auth::Basic::UserRequest::authenticate(HttpRequest * request, ConnStateData * conn, http_hdr_type type)
+Auth::Basic::UserRequest::authenticate(HttpRequest *, ConnStateData *, http_hdr_type)
 {
     assert(user() != NULL);
 
@@ -70,8 +70,6 @@ Auth::Basic::UserRequest::authenticate(HttpRequest * request, ConnStateData * co
     /* Decode now takes care of finding the AuthUser struct in the cache */
     /* after external auth occurs anyway */
     user()->expiretime = current_time.tv_sec;
-
-    return;
 }
 
 Auth::Direction
index efee47df3c9b3e36f45677824d3976c5088d6b18..2d7de1d4d8081c325d91b1f11dc4b6993d6ce297 100644 (file)
@@ -244,7 +244,7 @@ authenticateDigestNonceShutdown(void)
 }
 
 static void
-authenticateDigestNonceCacheCleanup(void *data)
+authenticateDigestNonceCacheCleanup(void *)
 {
     /*
      * We walk the hash by nonceb64 as that is the unique key we
@@ -506,7 +506,7 @@ Auth::Digest::Config::configured() const
 
 /* add the [www-|Proxy-]authenticate header on a 407 or 401 reply */
 void
-Auth::Digest::Config::fixHeader(Auth::UserRequest::Pointer auth_user_request, HttpReply *rep, http_hdr_type hdrType, HttpRequest * request)
+Auth::Digest::Config::fixHeader(Auth::UserRequest::Pointer auth_user_request, HttpReply *rep, http_hdr_type hdrType, HttpRequest *)
 {
     if (!authenticateProgram)
         return;
@@ -542,7 +542,7 @@ Auth::Digest::Config::fixHeader(Auth::UserRequest::Pointer auth_user_request, Ht
 /* Initialize helpers and the like for this auth scheme. Called AFTER parsing the
  * config file */
 void
-Auth::Digest::Config::init(Auth::Config * scheme)
+Auth::Digest::Config::init(Auth::Config *)
 {
     if (authenticateProgram) {
         DigestFieldsInfo = httpHeaderBuildFieldsInfo(DigestAttrs, DIGEST_ENUM_END);
index ad11b2cf0df3ec77e122f9fb38b626a4e6de3c27..997fd698f6f37f99f2f2424fa377a06f11faa6ce 100644 (file)
@@ -78,7 +78,7 @@ Auth::Digest::UserRequest::credentialsStr()
 /** log a digest user in
  */
 void
-Auth::Digest::UserRequest::authenticate(HttpRequest * request, ConnStateData * conn, http_hdr_type type)
+Auth::Digest::UserRequest::authenticate(HttpRequest * request, ConnStateData *, http_hdr_type)
 {
     HASHHEX SESSIONKEY;
     HASHHEX HA2 = "";
index e84b7fa2c6a479dc1f37cff7304d7ec271489ed5..46eae4ac0f4b8e2ac9d517f9497f1e2dff25806b 100644 (file)
@@ -121,7 +121,7 @@ Auth::Negotiate::Config::type() const
  * Called AFTER parsing the config file
  */
 void
-Auth::Negotiate::Config::init(Auth::Config * scheme)
+Auth::Negotiate::Config::init(Auth::Config *)
 {
     if (authenticateProgram) {
 
@@ -252,7 +252,7 @@ authenticateNegotiateStats(StoreEntry * sentry)
  * Auth_user structure.
  */
 Auth::UserRequest::Pointer
-Auth::Negotiate::Config::decode(char const *proxy_auth, const char *aRequestRealm)
+Auth::Negotiate::Config::decode(char const *, const char *aRequestRealm)
 {
     Auth::Negotiate::User *newUser = new Auth::Negotiate::User(Auth::Config::Find("negotiate"), aRequestRealm);
     Auth::UserRequest *auth_user_request = new Auth::Negotiate::UserRequest();
index b4561725611bde795f9141475eaeed62485a3cb9..aef77091e554050c19f20befba60b1b158481f5b 100644 (file)
@@ -107,7 +107,7 @@ Auth::Negotiate::UserRequest::module_direction()
 }
 
 void
-Auth::Negotiate::UserRequest::startHelperLookup(HttpRequest *req, AccessLogEntry::Pointer &al, AUTHCB * handler, void *data)
+Auth::Negotiate::UserRequest::startHelperLookup(HttpRequest *, AccessLogEntry::Pointer &al, AUTHCB * handler, void *data)
 {
     static char buf[MAX_AUTHTOKEN_LEN];
 
index cd500c911663d992514f2b3d9858a09744f20803..fe306809f6ee44eae7303f3b333231f63041121d 100644 (file)
@@ -111,7 +111,7 @@ Auth::Ntlm::Config::type() const
 /* Initialize helpers and the like for this auth scheme. Called AFTER parsing the
  * config file */
 void
-Auth::Ntlm::Config::init(Auth::Config * scheme)
+Auth::Ntlm::Config::init(Auth::Config *)
 {
     if (authenticateProgram) {
 
@@ -232,7 +232,7 @@ authenticateNTLMStats(StoreEntry * sentry)
  * Auth_user structure.
  */
 Auth::UserRequest::Pointer
-Auth::Ntlm::Config::decode(char const *proxy_auth, const char *aRequestRealm)
+Auth::Ntlm::Config::decode(char const *, const char *aRequestRealm)
 {
     Auth::Ntlm::User *newUser = new Auth::Ntlm::User(Auth::Config::Find("ntlm"), aRequestRealm);
     Auth::UserRequest::Pointer auth_user_request = new Auth::Ntlm::UserRequest();
index c44251e183007b994a6864336971fb2fcdc64212..7543ac8fabea725b8921015889dd8471a6b3fa5b 100644 (file)
@@ -106,7 +106,7 @@ Auth::Ntlm::UserRequest::module_direction()
 }
 
 void
-Auth::Ntlm::UserRequest::startHelperLookup(HttpRequest *req, AccessLogEntry::Pointer &al, AUTHCB * handler, void *data)
+Auth::Ntlm::UserRequest::startHelperLookup(HttpRequest *, AccessLogEntry::Pointer &al, AUTHCB * handler, void *data)
 {
     static char buf[MAX_AUTHTOKEN_LEN];
 
index e9aa1e6de74c8f946e01950967ea9b6bd79e7912..0f93516fe29977e9b6a5f2e4ee8248b21c7d2c8b 100644 (file)
@@ -22,10 +22,11 @@ public:
 
     UnaryCbdataDialer(Handler *aHandler, Argument1 *aArg) :
         arg1(aArg),
-        handler(aHandler) {}
+        handler(aHandler)
+    {}
 
-    virtual bool canDial(AsyncCall &call) { return arg1.valid(); }
-    void dial(AsyncCall &call) { handler(arg1.get()); }
+    virtual bool canDial(AsyncCall &) { return arg1.valid(); }
+    void dial(AsyncCall &) { handler(arg1.get()); }
     virtual void print(std::ostream &os) const {  os << '(' << arg1 << ')'; }
 
 public:
index 71577929a7e4c431a79870c432338acb2f0ef80d..e827835c2f905279b1c6fb34ee14628c3067ee4e 100644 (file)
@@ -123,7 +123,8 @@ void AsyncJob::callStart(AsyncCall &call)
            typeName << " status in:" << status());
 }
 
-void AsyncJob::callException(const std::exception &e)
+void
+AsyncJob::callException(const std::exception &)
 {
     // we must be called asynchronously and hence, the caller must lock us
     Must(cbdataReferenceValid(toCbdata()));
index 934f7f3c82b9f60e1b644c9d8983c8573de1ddb6..d154ab7c8d579b82a6a19d8d5690f817b3ec3542 100644 (file)
@@ -237,9 +237,9 @@ static void parse_CpuAffinityMap(CpuAffinityMap **const cpuAffinityMap);
 static void dump_CpuAffinityMap(StoreEntry *const entry, const char *const name, const CpuAffinityMap *const cpuAffinityMap);
 static void free_CpuAffinityMap(CpuAffinityMap **const cpuAffinityMap);
 
-static void parse_url_rewrite_timeout(SquidConfig *);
-static void dump_url_rewrite_timeout(StoreEntry *, const char *, SquidConfig &);
-static void free_url_rewrite_timeout(SquidConfig *);
+static void parse_UrlHelperTimeout(SquidConfig::UrlHelperTimeout *);
+static void dump_UrlHelperTimeout(StoreEntry *, const char *, SquidConfig::UrlHelperTimeout &);
+static void free_UrlHelperTimeout(SquidConfig::UrlHelperTimeout *);
 
 static int parseOneConfigFile(const char *file_name, unsigned int depth);
 
@@ -3334,9 +3334,7 @@ dump_removalpolicy(StoreEntry * entry, const char *name, RemovalPolicySettings *
 
 inline void
 free_YesNoNone(YesNoNone *)
-{
-    // do nothing: no explicit cleanup is required
-}
+{}
 
 static void
 parse_YesNoNone(YesNoNone *option)
@@ -3354,13 +3352,11 @@ dump_YesNoNone(StoreEntry * entry, const char *name, YesNoNone &option)
 }
 
 static void
-free_memcachemode(SquidConfig * config)
-{
-    return;
-}
+free_memcachemode(SquidConfig *)
+{}
 
 static void
-parse_memcachemode(SquidConfig * config)
+parse_memcachemode(SquidConfig *)
 {
     char *token = ConfigParser::NextToken();
     if (!token)
@@ -3385,7 +3381,7 @@ parse_memcachemode(SquidConfig * config)
 }
 
 static void
-dump_memcachemode(StoreEntry * entry, const char *name, SquidConfig &config)
+dump_memcachemode(StoreEntry * entry, const char *name, SquidConfig &)
 {
     storeAppendPrintf(entry, "%s ", name);
     if (Config.onoff.memory_cache_first && Config.onoff.memory_cache_disk)
@@ -4770,8 +4766,7 @@ static void dump_HeaderWithAclList(StoreEntry * entry, const char *name, HeaderW
         return;
 
     for (HeaderWithAclList::iterator hwa = headers->begin(); hwa != headers->end(); ++hwa) {
-        storeAppendPrintf(entry, "%s ", hwa->fieldName.c_str());
-        storeAppendPrintf(entry, "%s ", hwa->fieldValue.c_str());
+        storeAppendPrintf(entry, "%s %s %s", name, hwa->fieldName.c_str(), hwa->fieldValue.c_str());
         if (hwa->aclList)
             dump_acl_list(entry, hwa->aclList);
         storeAppendPrintf(entry, "\n");
@@ -4914,7 +4909,7 @@ static void free_ftp_epsv(acl_access **ftp_epsv)
 }
 
 static void
-parse_url_rewrite_timeout(SquidConfig *config)
+parse_UrlHelperTimeout(SquidConfig::UrlHelperTimeout *config)
 {
     time_msec_t tval;
     parseTimeLine(&tval, T_SECOND_STR, false, true);
@@ -4924,62 +4919,61 @@ parse_url_rewrite_timeout(SquidConfig *config)
     while(ConfigParser::NextKvPair(key, value)) {
         if (strcasecmp(key, "on_timeout") == 0) {
             if (strcasecmp(value, "bypass") == 0)
-                Config.onUrlRewriteTimeout.action = toutActBypass;
+                config->action = toutActBypass;
             else if (strcasecmp(value, "fail") == 0)
-                Config.onUrlRewriteTimeout.action = toutActFail;
+                config->action = toutActFail;
             else if (strcasecmp(value, "retry") == 0)
-                Config.onUrlRewriteTimeout.action = toutActRetry;
+                config->action = toutActRetry;
             else if (strcasecmp(value, "use_configured_response") == 0) {
-                Config.onUrlRewriteTimeout.action = toutActUseConfiguredResponse;
+                config->action = toutActUseConfiguredResponse;
             } else {
                 debugs(3, DBG_CRITICAL, "FATAL: unsuported \"on_timeout\"  action:" << value);
                 self_destruct();
             }
         } else if (strcasecmp(key, "response") == 0) {
-            Config.onUrlRewriteTimeout.response = xstrdup(value);
+            config->response = xstrdup(value);
         } else {
             debugs(3, DBG_CRITICAL, "FATAL: unsuported option " << key);
             self_destruct();
         }
     }
 
-    if (Config.onUrlRewriteTimeout.action == toutActUseConfiguredResponse && !Config.onUrlRewriteTimeout.response) {
+    if (config->action == toutActUseConfiguredResponse && !config->response) {
         debugs(3, DBG_CRITICAL, "FATAL: Expected 'response=' option after 'on_timeout=use_configured_response' option");
         self_destruct();
     }
 
-    if (Config.onUrlRewriteTimeout.action != toutActUseConfiguredResponse && Config.onUrlRewriteTimeout.response) {
+    if (config->action != toutActUseConfiguredResponse && config->response) {
         debugs(3, DBG_CRITICAL, "FATAL: 'response=' option is valid only when used with the  'on_timeout=use_configured_response' option");
         self_destruct();
     }
 }
 
 static void
-dump_url_rewrite_timeout(StoreEntry *entry, const char *name, SquidConfig &config)
+dump_UrlHelperTimeout(StoreEntry *entry, const char *name, SquidConfig::UrlHelperTimeout &config)
 {
     const char  *onTimedOutActions[] = {"bypass", "fail", "retry", "use_configured_response"};
-    assert(Config.onUrlRewriteTimeout.action >= 0 && Config.onUrlRewriteTimeout.action <= toutActUseConfiguredResponse);
+    assert(config.action >= 0 && config.action <= toutActUseConfiguredResponse);
 
     dump_time_t(entry, name, Config.Timeout.urlRewrite);
-    storeAppendPrintf(entry, " on_timeout=%s", onTimedOutActions[Config.onUrlRewriteTimeout.action]);
+    storeAppendPrintf(entry, " on_timeout=%s", onTimedOutActions[config.action]);
 
-    if (Config.onUrlRewriteTimeout.response)
-        storeAppendPrintf(entry, " response=\"%s\"", Config.onUrlRewriteTimeout.response);
+    if (config.response)
+        storeAppendPrintf(entry, " response=\"%s\"", config.response);
 
     storeAppendPrintf(entry, "\n");
 }
 
 static void
-free_url_rewrite_timeout(SquidConfig *config)
+free_UrlHelperTimeout(SquidConfig::UrlHelperTimeout *config)
 {
     Config.Timeout.urlRewrite = 0;
-    Config.onUrlRewriteTimeout.action = 0;
-    xfree(Config.onUrlRewriteTimeout.response);
-    Config.onUrlRewriteTimeout.response = NULL;
+    config->action = 0;
+    safe_free(config->response);
 }
 
 static void
-parse_configuration_includes_quoted_values(bool *recognizeQuotedValues)
+parse_configuration_includes_quoted_values(bool *)
 {
     int val = 0;
     parse_onoff(&val);
@@ -4995,14 +4989,14 @@ parse_configuration_includes_quoted_values(bool *recognizeQuotedValues)
 }
 
 static void
-dump_configuration_includes_quoted_values(StoreEntry *const entry, const char *const name, bool recognizeQuotedValues)
+dump_configuration_includes_quoted_values(StoreEntry *const entry, const char *const name, bool)
 {
     int val = ConfigParser::RecognizeQuotedValues ? 1 : 0;
     dump_onoff(entry, name, val);
 }
 
 static void
-free_configuration_includes_quoted_values(bool *recognizeQuotedValues)
+free_configuration_includes_quoted_values(bool *)
 {
     ConfigParser::RecognizeQuotedValues = false;
     ConfigParser::StrictMode = false;
index bc0c64aec4ab0eef42681f5a3e7881150a087498..a33ce13a15f3b69e6bb2b2a398aa567e21d4b1d8 100644 (file)
@@ -66,8 +66,12 @@ class cbdata
 {
 #if !HASHED_CBDATA
 public:
-    void *operator new(size_t size, void *where);
-    void operator delete(void *where, void *where2);
+    void *operator new(size_t, void *where) {return where;}
+    /**
+     * Only ever invoked when placement new throws
+     * an exception. Used to prevent an incorrect free.
+     */
+    void operator delete(void *, void *) {}
 #else
     MEMPROXY_CLASS(cbdata);
 #endif
@@ -105,7 +109,7 @@ public:
 
     /* cookie used while debugging */
     long cookie;
-    void check(int aLine) const {assert(cookie == ((long)this ^ Cookie));}
+    void check(int) const {assert(cookie == ((long)this ^ Cookie));}
     static const long Cookie;
 
 #if !HASHED_CBDATA
@@ -122,24 +126,6 @@ const long cbdata::Cookie((long)0xDEADBEEF);
 #if !HASHED_CBDATA
 const long cbdata::Offset(MakeOffset());
 
-void *
-cbdata::operator new(size_t size, void *where)
-{
-    // assert (size == sizeof(cbdata));
-    return where;
-}
-
-/**
- * Only ever invoked when placement new throws
- * an exception. Used to prevent an incorrect
- * free.
- */
-void
-cbdata::operator delete(void *where, void *where2)
-{
-    ; // empty.
-}
-
 long
 cbdata::MakeOffset()
 {
index dd4c98c1eeffb0e58a08640f60d0a9dc49ba19a7..b19d55db8793fd070e1b9b9dcf546ca7cea9da8c 100644 (file)
@@ -74,7 +74,7 @@ time_msec
 time_t
 tristate
 uri_whitespace
-url_rewrite_timeout
+UrlHelperTimeout       acl
 u_short
 wccp2_method
 wccp2_amethod
index d8ffdc94bb0d54219e61879d8dfa9c1d303cd1b0..3cd328b0c0cff840ff4420631bc008d10787de52 100644 (file)
@@ -4955,8 +4955,8 @@ DOC_START
 DOC_END
 
 NAME: url_rewrite_timeout
-TYPE: url_rewrite_timeout
-LOC: Config
+TYPE: UrlHelperTimeout
+LOC: Config.onUrlRewriteTimeout
 DEFAULT: none
 DEFAULT_DOC: Squid waits for the helper response forever
 DOC_START
@@ -4964,17 +4964,17 @@ DOC_START
        reaction to a timed out request are configurable using the following
        format:
 
-       url_rewrite_timeout timeout time-units  on_timeout=<action> [response=<quoted-response>]
+       url_rewrite_timeout timeout time-units on_timeout=<action> [response=<quoted-response>]
 
        supported timeout actions:
-                       fail  Squid return a ERR_GATEWAY_FAILURE error page
+               fail    Squid return a ERR_GATEWAY_FAILURE error page
 
-                       bypass  Do not re-write the URL
+               bypass  Do not re-write the URL
 
-                       retry  Send the lookup to the helper again
+               retry   Send the lookup to the helper again
 
-                       use_configured_response  Use the <quoted-response> as
-                       helper response
+               use_configured_response
+                       Use the <quoted-response> as helper response
 DOC_END
 
 COMMENT_START
index 61bbc16415d67fc6aa758c47c28ddc0036a3ecd5..e65433330556707348595eb46c77cac66f4a3ac4 100644 (file)
@@ -353,14 +353,14 @@ clientdbFreeMemory(void)
 }
 
 static void
-clientdbScheduledGC(void *unused)
+clientdbScheduledGC(void *)
 {
     cleanup_scheduled = 0;
     clientdbStartGC();
 }
 
 static void
-clientdbGC(void *unused)
+clientdbGC(void *)
 {
     static int bucket = 0;
     hash_link *link_next;
index a458fc3bcb758705a805e07b1141c4869b1afd50..fc3e94438f5de7a0d1176e82114120966f168865 100644 (file)
@@ -725,7 +725,7 @@ ConnStateData::notifyAllContexts(int xerrno)
 }
 
 /* This is a handler normally called by comm_close() */
-void ConnStateData::connStateClosed(const CommCloseCbParams &io)
+void ConnStateData::connStateClosed(const CommCloseCbParams &)
 {
     deleteThis("ConnStateData::connStateClosed");
 }
@@ -1489,9 +1489,9 @@ clientSocketDetach(clientStreamNode * node, ClientHttpRequest * http)
 }
 
 static void
-clientWriteBodyComplete(const Comm::ConnectionPointer &conn, char *buf, size_t size, Comm::Flag errflag, int xerrno, void *data)
+clientWriteBodyComplete(const Comm::ConnectionPointer &conn, char *, size_t size, Comm::Flag errflag, int xerrno, void *data)
 {
-    debugs(33,7, HERE << "clientWriteBodyComplete schedules clientWriteComplete");
+    debugs(33,7, "schedule clientWriteComplete");
     clientWriteComplete(conn, NULL, size, errflag, xerrno, data);
 }
 
@@ -1783,7 +1783,7 @@ ClientSocketContext::socketState()
  * no more data to send.
  */
 void
-clientWriteComplete(const Comm::ConnectionPointer &conn, char *bufnotused, size_t size, Comm::Flag errflag, int xerrno, void *data)
+clientWriteComplete(const Comm::ConnectionPointer &conn, char *bufnotused, size_t size, Comm::Flag errflag, int, void *data)
 {
     ClientSocketContext *context = (ClientSocketContext *)data;
     context->writeComplete(conn, bufnotused, size, errflag);
@@ -1839,7 +1839,7 @@ ConnStateData::stopSending(const char *error)
 }
 
 void
-ClientSocketContext::writeComplete(const Comm::ConnectionPointer &conn, char *bufnotused, size_t size, Comm::Flag errflag)
+ClientSocketContext::writeComplete(const Comm::ConnectionPointer &conn, char *, size_t size, Comm::Flag errflag)
 {
     const StoreEntry *entry = http->storeEntry();
     http->out.size += size;
index 4d812541b32901a1f92a7a54b94df4f1efad7919..46e2589750276255318a3c020e5ddff9be89e730 100644 (file)
@@ -755,7 +755,7 @@ Ftp::Client::dataCloser()
 
 /// handler called by Comm when FTP data channel is closed unexpectedly
 void
-Ftp::Client::dataClosed(const CommCloseCbParams &io)
+Ftp::Client::dataClosed(const CommCloseCbParams &)
 {
     debugs(9, 4, status());
     if (data.listenConn != NULL) {
@@ -823,7 +823,7 @@ Ftp::Client::writeCommandCallback(const CommIoCbParams &io)
 
 /// handler called by Comm when FTP control channel is closed unexpectedly
 void
-Ftp::Client::ctrlClosed(const CommCloseCbParams &io)
+Ftp::Client::ctrlClosed(const CommCloseCbParams &)
 {
     debugs(9, 4, status());
     ctrl.clear();
index 0f33ce661a59d89280b1100acfaa099c28b4fd27..0d39c4b89ead1a16fa2b04790eb9f742acb36404 100644 (file)
@@ -448,7 +448,7 @@ Comm::ConnOpener::timeout(const CommTimeoutCbParams &)
  * XXX: As soon as Comm::SetSelect() accepts Async calls we can use a ConnOpener::doConnect call
  */
 void
-Comm::ConnOpener::InProgressConnectRetry(int fd, void *data)
+Comm::ConnOpener::InProgressConnectRetry(int, void *data)
 {
     Pointer *ptr = static_cast<Pointer*>(data);
     assert(ptr);
index e9f39be131d284792aebea835bc3e9cea7689a58..bea999614b7aa52e8a891df6b3d0f8273d2bfcf7 100644 (file)
@@ -38,7 +38,7 @@
 
 CBDATA_NAMESPACED_CLASS_INIT(Comm, TcpAcceptor);
 
-Comm::TcpAcceptor::TcpAcceptor(const Comm::ConnectionPointer &newConn, const char *note, const Subscription::Pointer &aSub) :
+Comm::TcpAcceptor::TcpAcceptor(const Comm::ConnectionPointer &newConn, const char *, const Subscription::Pointer &aSub) :
     AsyncJob("Comm::TcpAcceptor"),
     errcode(0),
     isLimited(0),
@@ -47,7 +47,7 @@ Comm::TcpAcceptor::TcpAcceptor(const Comm::ConnectionPointer &newConn, const cha
     listenPort_()
 {}
 
-Comm::TcpAcceptor::TcpAcceptor(const AnyP::PortCfgPointer &p, const char *note, const Subscription::Pointer &aSub) :
+Comm::TcpAcceptor::TcpAcceptor(const AnyP::PortCfgPointer &p, const char *, const Subscription::Pointer &aSub) :
     AsyncJob("Comm::TcpAcceptor"),
     errcode(0),
     isLimited(0),
@@ -199,7 +199,7 @@ Comm::TcpAcceptor::setListen()
 /// called when listening descriptor is closed by an external force
 /// such as clientHttpConnectionsClose()
 void
-Comm::TcpAcceptor::handleClosure(const CommCloseCbParams &io)
+Comm::TcpAcceptor::handleClosure(const CommCloseCbParams &)
 {
     closer_ = NULL;
     conn = NULL;
index 3311937aac170c95953633dd968b536caed3effa..cb9b81456ad49ded048d61721fd97cd2e780ad07 100644 (file)
@@ -190,7 +190,7 @@ diskCombineWrites(_fde_disk *fdd)
 
 /* write handler */
 static void
-diskHandleWrite(int fd, void *notused)
+diskHandleWrite(int fd, void *)
 {
     int len = 0;
     fde *F = &fd_table[fd];
index 7be099be1e8830ed3704f266c205b0eb7ebe7b88..4d3945fc3c0ea54bf53dc41128a2104637308068 100644 (file)
@@ -769,7 +769,7 @@ idnsTickleQueue(void)
 }
 
 static void
-idnsSentQueryVC(const Comm::ConnectionPointer &conn, char *buf, size_t size, Comm::Flag flag, int xerrno, void *data)
+idnsSentQueryVC(const Comm::ConnectionPointer &conn, char *, size_t size, Comm::Flag flag, int, void *data)
 {
     nsvc * vc = (nsvc *)data;
 
@@ -823,7 +823,7 @@ idnsDoSendQueryVC(nsvc *vc)
 }
 
 static void
-idnsInitVCConnected(const Comm::ConnectionPointer &conn, Comm::Flag status, int xerrno, void *data)
+idnsInitVCConnected(const Comm::ConnectionPointer &conn, Comm::Flag status, int, void *data)
 {
     nsvc * vc = (nsvc *)data;
 
@@ -1117,7 +1117,7 @@ idnsCallback(idns_query *q, const char *error)
 }
 
 static void
-idnsGrokReply(const char *buf, size_t sz, int from_ns)
+idnsGrokReply(const char *buf, size_t sz, int /*from_ns*/)
 {
     int n;
     rfc1035_message *message = NULL;
@@ -1269,7 +1269,7 @@ idnsGrokReply(const char *buf, size_t sz, int from_ns)
 }
 
 static void
-idnsRead(int fd, void *data)
+idnsRead(int fd, void *)
 {
     int *N = &incoming_sockets_accepted;
     int len;
@@ -1354,7 +1354,7 @@ idnsRead(int fd, void *data)
 }
 
 static void
-idnsCheckQueue(void *unused)
+idnsCheckQueue(void *)
 {
     dlink_node *n;
     dlink_node *p = NULL;
@@ -1408,7 +1408,7 @@ idnsCheckQueue(void *unused)
 }
 
 static void
-idnsReadVC(const Comm::ConnectionPointer &conn, char *buf, size_t len, Comm::Flag flag, int xerrno, void *data)
+idnsReadVC(const Comm::ConnectionPointer &conn, char *buf, size_t len, Comm::Flag flag, int, void *data)
 {
     nsvc * vc = (nsvc *)data;
 
@@ -1441,7 +1441,7 @@ idnsReadVC(const Comm::ConnectionPointer &conn, char *buf, size_t len, Comm::Fla
 }
 
 static void
-idnsReadVCHeader(const Comm::ConnectionPointer &conn, char *buf, size_t len, Comm::Flag flag, int xerrno, void *data)
+idnsReadVCHeader(const Comm::ConnectionPointer &conn, char *buf, size_t len, Comm::Flag flag, int, void *data)
 {
     nsvc * vc = (nsvc *)data;
 
index 122e20b22f9db59e7b15e3b4a7dbd10b9c827c1d..b802eec05f6d89d6407a630c28d8ce7ad3cd4647 100644 (file)
@@ -124,14 +124,14 @@ static IOCB errorSendComplete;
 class ErrorPageFile: public TemplateFile
 {
 public:
-    ErrorPageFile(const char *name, const err_type code): TemplateFile(name,code) { textBuf.init();}
+    ErrorPageFile(const char *name, const err_type code) : TemplateFile(name,code) {textBuf.init();}
 
     /// The template text data read from disk
     const char *text() { return textBuf.content(); }
 
 private:
     /// stores the data read from disk to a local buffer
-    virtual bool parse(const char *buf, int len, bool eof) {
+    virtual bool parse(const char *buf, int len, bool) {
         if (len)
             textBuf.append(buf, len);
         return true;
@@ -654,7 +654,7 @@ errorSend(const Comm::ConnectionPointer &conn, ErrorState * err)
  *     closing the FD, otherwise we do it ourselves.
  */
 static void
-errorSendComplete(const Comm::ConnectionPointer &conn, char *bufnotused, size_t size, Comm::Flag errflag, int xerrno, void *data)
+errorSendComplete(const Comm::ConnectionPointer &conn, char *, size_t size, Comm::Flag errflag, int, void *data)
 {
     ErrorState *err = static_cast<ErrorState *>(data);
     debugs(4, 3, HERE << conn << ", size=" << size);
@@ -1107,7 +1107,7 @@ ErrorState::Convert(char token, bool building_deny_info_url, bool allowRecursion
 }
 
 void
-ErrorState::DenyInfoLocation(const char *name, HttpRequest *aRequest, MemBuf &result)
+ErrorState::DenyInfoLocation(const char *name, HttpRequest *, MemBuf &result)
 {
     char const *m = name;
     char const *p = m;
index 654f36c42d6168f359d73127cb75d00b550ab0e5..d09202e20e8badd690bf923569f1698437fea154 100644 (file)
@@ -75,7 +75,7 @@ Eui::Eui64::lookupSlaac(const Ip::Address &c)
 
 // return binary representation of the EUI
 bool
-Eui::Eui64::lookupNdp(const Ip::Address &c)
+Eui::Eui64::lookupNdp(const Ip::Address &/*c*/)
 {
 #if 0 /* no actual lookup coded yet */
 
index 6f9c8f3b0881e580a65d901618bd3750a4c32613..2c589da7e8518311ad2aa57c3c9f8e78f049846f 100644 (file)
@@ -219,7 +219,7 @@ EventScheduler::timeRemaining() const
 }
 
 int
-EventScheduler::checkEvents(int timeout)
+EventScheduler::checkEvents(int)
 {
     int result = timeRemaining();
     if (result != 0)
index 069a063c60338e86f80adc4d0e9322f74d213582..9747a73a7d2931194e308d7f0bf3bcfc10d43670 100644 (file)
--- a/src/fd.cc
+++ b/src/fd.cc
@@ -164,7 +164,7 @@ default_write_method(int fd, const char *buf, int len)
 }
 
 int
-msghdr_read_method(int fd, char *buf, int len)
+msghdr_read_method(int fd, char *buf, int)
 {
     PROF_start(read);
     const int i = recvmsg(fd, reinterpret_cast<msghdr*>(buf), MSG_DONTWAIT);
index dc57ea17f2ce3f31bde523fea915a23cec2cf72b..93cceef2649f2d7e6cf89f66eff747cf5a1270cc 100644 (file)
@@ -203,7 +203,7 @@ fqdncacheExpiredEntry(const fqdncache_entry * f)
 
 /// \ingroup FQDNCacheAPI
 void
-fqdncache_purgelru(void *notused)
+fqdncache_purgelru(void *)
 {
     dlink_node *m;
     dlink_node *prev = NULL;
index ee70acbae414c5e49cfb28856755928615bc1180..63eddfd14371b1e11c1d3c6a7feba633c705896e 100644 (file)
@@ -374,13 +374,13 @@ public:
         cbdataReferenceDone(callback_data); // may be nil already
     }
 
-    void dial(AsyncCall &call) {
+    void dial(AsyncCall &) {
         void *cbd;
         if (cbdataReferenceValidDone(callback_data, &cbd) && callback)
             callback(cbd, errflag, sio.getRaw());
     }
 
-    bool canDial(AsyncCall &call) const {
+    bool canDial(AsyncCall &) const {
         return cbdataReferenceValid(callback_data) && callback;
     }
 
@@ -389,7 +389,7 @@ public:
     }
 
 private:
-    StoreIOStateCb &operator =(const StoreIOStateCb &cb); // not defined
+    StoreIOStateCb &operator =(const StoreIOStateCb &); // not defined
 
     StoreIOState::STIOCB *callback;
     void *callback_data;
index 2f7bdc8c4768def9f02d52562ff31eaa741ee653..053f1a5c7c9de9a212b3aa7449ad3d28e3041be4 100644 (file)
@@ -51,7 +51,7 @@ Rock::StoreFileSystem::setup()
 }
 
 void
-Rock::StoreFileSystem::Stats(StoreEntry *sentry)
+Rock::StoreFileSystem::Stats(StoreEntry *)
 {
     assert(false); // XXX: implement
 }
index 5871e0da0d6cd2100657a4b39fd53ca1e6c751b2..112b976e6dc1931bfde492540384cef708029171 100644 (file)
@@ -52,7 +52,7 @@ Rock::SwapDir::~SwapDir()
 }
 
 StoreSearch *
-Rock::SwapDir::search(String const url, HttpRequest *)
+Rock::SwapDir::search(String const, HttpRequest *)
 {
     assert(false);
     return NULL; // XXX: implement
@@ -810,7 +810,7 @@ Rock::SwapDir::closeCompleted()
 }
 
 void
-Rock::SwapDir::readCompleted(const char *buf, int rlen, int errflag, RefCount< ::ReadRequest> r)
+Rock::SwapDir::readCompleted(const char *, int rlen, int errflag, RefCount< ::ReadRequest> r)
 {
     ReadRequest *request = dynamic_cast<Rock::ReadRequest*>(r.getRaw());
     assert(request);
@@ -823,7 +823,7 @@ Rock::SwapDir::readCompleted(const char *buf, int rlen, int errflag, RefCount< :
 }
 
 void
-Rock::SwapDir::writeCompleted(int errflag, size_t rlen, RefCount< ::WriteRequest> r)
+Rock::SwapDir::writeCompleted(int errflag, size_t, RefCount< ::WriteRequest> r)
 {
     Rock::WriteRequest *request = dynamic_cast<Rock::WriteRequest*>(r.getRaw());
     assert(request);
index fa84c1bc82a3c5640dd6b725f2b8b3701616abc1..d8362aed533741f7dd676ee7b0d294984389fe74 100644 (file)
@@ -417,7 +417,7 @@ Fs::Ufs::RebuildState::undoAdd()
 }
 
 int
-Fs::Ufs::RebuildState::getNextFile(sfileno * filn_p, int *size)
+Fs::Ufs::RebuildState::getNextFile(sfileno * filn_p, int *)
 {
     int fd = -1;
     int dirs_opened = 0;
index e51133a7da2b876df236eb24fc59bcf33ae15187..f4135b4b9ebbed91d1a97c25ab506080bb20cc4a 100644 (file)
@@ -223,7 +223,7 @@ Fs::Ufs::UFSStoreState::doWrite()
 }
 
 void
-Fs::Ufs::UFSStoreState::readCompleted(const char *buf, int len, int errflag, RefCount<ReadRequest> result)
+Fs::Ufs::UFSStoreState::readCompleted(const char *buf, int len, int, RefCount<ReadRequest> result)
 {
     assert (result.getRaw());
     reading = false;
@@ -266,7 +266,7 @@ Fs::Ufs::UFSStoreState::readCompleted(const char *buf, int len, int errflag, Ref
 }
 
 void
-Fs::Ufs::UFSStoreState::writeCompleted(int errflag, size_t len, RefCount<WriteRequest> writeRequest)
+Fs::Ufs::UFSStoreState::writeCompleted(int, size_t len, RefCount<WriteRequest>)
 {
     debugs(79, 3, HERE << "dirno " << swap_dirn << ", fileno " <<
            std::setfill('0') << std::hex << std::uppercase << std::setw(8) << swap_filen <<
index d2db4cbe46d4943e6443e0cee64cff1bd8285bb4..296b891cbc9efed67d4265b159de5b184a4b0806 100644 (file)
@@ -54,7 +54,7 @@ Fs::Ufs::UFSStrategy::unlinkFile(char const *path)
 }
 
 StoreIOState::Pointer
-Fs::Ufs::UFSStrategy::open(SwapDir * SD, StoreEntry * e, StoreIOState::STFNCB * file_callback,
+Fs::Ufs::UFSStrategy::open(SwapDir * SD, StoreEntry * e, StoreIOState::STFNCB *,
                            StoreIOState::STIOCB * aCallback, void *callback_data)
 {
     assert (((UFSSwapDir *)SD)->IO == this);
@@ -90,7 +90,7 @@ Fs::Ufs::UFSStrategy::open(SwapDir * SD, StoreEntry * e, StoreIOState::STFNCB *
 }
 
 StoreIOState::Pointer
-Fs::Ufs::UFSStrategy::create(SwapDir * SD, StoreEntry * e, StoreIOState::STFNCB * file_callback,
+Fs::Ufs::UFSStrategy::create(SwapDir * SD, StoreEntry * e, StoreIOState::STFNCB *,
                              StoreIOState::STIOCB * aCallback, void *callback_data)
 {
     assert (((UFSSwapDir *)SD)->IO == this);
index 0d3e3f9ca94d9f1f84d220b390de566913807614..49fc1af13b7065ba55326d87c592cc266bb0e31f 100644 (file)
@@ -729,7 +729,7 @@ Fs::Ufs::UFSSwapDir::addDiskRestore(const cache_key * key,
                                     time_t lastmod,
                                     uint32_t refcount,
                                     uint16_t newFlags,
-                                    int clean)
+                                    int)
 {
     StoreEntry *e = NULL;
     debugs(47, 5, HERE << storeKeyText(key)  <<
@@ -999,7 +999,7 @@ Fs::Ufs::UFSSwapDir::writeCleanDone()
 }
 
 void
-Fs::Ufs::UFSSwapDir::CleanEvent(void *unused)
+Fs::Ufs::UFSSwapDir::CleanEvent(void *)
 {
     static int swap_index = 0;
     int i;
@@ -1217,7 +1217,7 @@ Fs::Ufs::UFSSwapDir::swappedOut(const StoreEntry &e)
 }
 
 StoreSearch *
-Fs::Ufs::UFSSwapDir::search(String const url, HttpRequest *request)
+Fs::Ufs::UFSSwapDir::search(String const url, HttpRequest *)
 {
     if (url.size())
         fatal ("Cannot search by url yet\n");
index 0043260543ece8758926cd2f9a279937f0d56f95..4fc6bdf5b94df051b92686809479b30a28d56883 100644 (file)
@@ -153,7 +153,7 @@ gopherStateFree(const CommCloseCbParams &params)
 }
 
 void
-GopherStateData::deleteThis(const char *reason)
+GopherStateData::deleteThis(const char *)
 {
     swanSong();
     delete this;
@@ -888,7 +888,7 @@ gopherSendComplete(const Comm::ConnectionPointer &conn, char *buf, size_t size,
  * This will be called when connect completes. Write request.
  */
 static void
-gopherSendRequest(int fd, void *data)
+gopherSendRequest(int, void *data)
 {
     GopherStateData *gopherState = (GopherStateData *)data;
     char *buf = (char *)memAllocate(MEM_4K_BUF);
index df6cace9710154b41b15c3890b0ae4ee34975725..9ac6569fd7193f3c66dd2100ef8e5a0fb84c16d2 100644 (file)
@@ -953,7 +953,7 @@ helperReturnBuffer(int request_number, helper_server * srv, helper * hlp, char *
 }
 
 static void
-helperHandleRead(const Comm::ConnectionPointer &conn, char *buf, size_t len, Comm::Flag flag, int xerrno, void *data)
+helperHandleRead(const Comm::ConnectionPointer &conn, char *, size_t len, Comm::Flag flag, int, void *data)
 {
     char *t = NULL;
     helper_server *srv = (helper_server *)data;
@@ -1047,7 +1047,7 @@ helperHandleRead(const Comm::ConnectionPointer &conn, char *buf, size_t len, Com
 }
 
 static void
-helperStatefulHandleRead(const Comm::ConnectionPointer &conn, char *buf, size_t len, Comm::Flag flag, int xerrno, void *data)
+helperStatefulHandleRead(const Comm::ConnectionPointer &conn, char *, size_t len, Comm::Flag flag, int, void *data)
 {
     char *t = NULL;
     helper_stateful_server *srv = (helper_stateful_server *)data;
@@ -1339,7 +1339,7 @@ StatefulGetFirstAvailable(statefulhelper * hlp)
 }
 
 static void
-helperDispatchWriteDone(const Comm::ConnectionPointer &conn, char *buf, size_t len, Comm::Flag flag, int xerrno, void *data)
+helperDispatchWriteDone(const Comm::ConnectionPointer &, char *, size_t, Comm::Flag flag, int, void *data)
 {
     helper_server *srv = (helper_server *)data;
 
@@ -1408,11 +1408,8 @@ helperDispatch(helper_server * srv, Helper::Request * r)
 }
 
 static void
-helperStatefulDispatchWriteDone(const Comm::ConnectionPointer &conn, char *buf, size_t len, Comm::Flag flag,
-                                int xerrno, void *data)
-{
-    /* nothing! */
-}
+helperStatefulDispatchWriteDone(const Comm::ConnectionPointer &, char *, size_t, Comm::Flag, int, void *)
+{}
 
 static void
 helperStatefulDispatch(helper_stateful_server * srv, Helper::Request * r)
index db592cbd2a39a7ef84e293c5f4ffe0ad9bc266c0..484c3760003a31acec0b09935b918fe10dd0d818 100644 (file)
@@ -276,12 +276,6 @@ static void htcpFreeDetail(htcpDetail * s);
 static void htcpHandleMsg(char *buf, int sz, Ip::Address &from);
 
 static void htcpLogHtcp(Ip::Address &, int, LogTags, const char *);
-static void htcpHandleMon(htcpDataHeader *, char *buf, int sz, Ip::Address &from);
-
-static void htcpHandleNop(htcpDataHeader *, char *buf, int sz, Ip::Address &from);
-
-static void htcpHandleSet(htcpDataHeader *, char *buf, int sz, Ip::Address &from);
-
 static void htcpHandleTst(htcpDataHeader *, char *buf, int sz, Ip::Address &from);
 
 static void htcpRecv(int fd, void *data);
@@ -298,14 +292,12 @@ static void
 htcpHexdump(const char *tag, const char *s, int sz)
 {
 #if USE_HEXDUMP
-    int i;
-    int k;
     char hex[80];
     debugs(31, 3, "htcpHexdump " << tag);
-    memset(hex, '\0', 80);
+    memset(hex, '\0', sizeof(hex));
 
-    for (i = 0; i < sz; ++i) {
-        k = i % 16;
+    for (int i = 0; i < sz; ++i) {
+        int k = i % 16;
         snprintf(&hex[k * 3], 4, " %02x", (int) *(s + i));
 
         if (k < 15 && i < (sz - 1))
@@ -313,9 +305,8 @@ htcpHexdump(const char *tag, const char *s, int sz)
 
         debugs(31, 3, "\t" << hex);
 
-        memset(hex, '\0', 80);
+        memset(hex, '\0', sizeof(hex));
     }
-
 #endif
 }
 
@@ -972,13 +963,6 @@ htcpClrReply(htcpDataHeader * dhdr, int purgeSucceeded, Ip::Address &from)
     htcpSend(pkt, (int) pktlen, from);
 }
 
-static void
-
-htcpHandleNop(htcpDataHeader * hdr, char *buf, int sz, Ip::Address &from)
-{
-    debugs(31, 3, "htcpHandleNop: Unimplemented");
-}
-
 void
 htcpSpecifier::checkHit()
 {
@@ -1212,20 +1196,6 @@ htcpSpecifier::checkedHit(StoreEntry *e)
     htcpFreeSpecifier(this);
 }
 
-static void
-
-htcpHandleMon(htcpDataHeader * hdr, char *buf, int sz, Ip::Address &from)
-{
-    debugs(31, 3, "htcpHandleMon: Unimplemented");
-}
-
-static void
-
-htcpHandleSet(htcpDataHeader * hdr, char *buf, int sz, Ip::Address &from)
-{
-    debugs(31, 3, "htcpHandleSet: Unimplemented");
-}
-
 static void
 htcpHandleClr(htcpDataHeader * hdr, char *buf, int sz, Ip::Address &from)
 {
@@ -1417,16 +1387,16 @@ htcpHandleMsg(char *buf, int sz, Ip::Address &from)
 
     switch (hdr.opcode) {
     case HTCP_NOP:
-        htcpHandleNop(&hdr, hbuf, hsz, from);
+        debugs(31, 3, "HTCP NOP not implemented");
         break;
     case HTCP_TST:
         htcpHandleTst(&hdr, hbuf, hsz, from);
         break;
     case HTCP_MON:
-        htcpHandleMon(&hdr, hbuf, hsz, from);
+        debugs(31, 3, "HTCP MON not implemented");
         break;
     case HTCP_SET:
-        htcpHandleSet(&hdr, hbuf, hsz, from);
+        debugs(31, 3, "HTCP SET not implemented");
         break;
     case HTCP_CLR:
         htcpHandleClr(&hdr, hbuf, hsz, from);
@@ -1438,7 +1408,7 @@ htcpHandleMsg(char *buf, int sz, Ip::Address &from)
 }
 
 static void
-htcpRecv(int fd, void *data)
+htcpRecv(int fd, void *)
 {
     static char buf[8192];
     int len;
@@ -1595,7 +1565,7 @@ htcpQuery(StoreEntry * e, HttpRequest * req, CachePeer * p)
  * Send an HTCP CLR message for a specified item to a given CachePeer.
  */
 void
-htcpClear(StoreEntry * e, const char *uri, HttpRequest * req, const HttpRequestMethod &method, CachePeer * p, htcp_clr_reason reason)
+htcpClear(StoreEntry * e, const char *uri, HttpRequest * req, const HttpRequestMethod &, CachePeer * p, htcp_clr_reason reason)
 {
     static char pkt[8192];
     ssize_t pktlen;
index a88a92d9c787beeced73ca15069a3028901f545c..99ba4c37c61f83b02b403a4931dcb13722fad78b 100644 (file)
@@ -157,9 +157,9 @@ HttpStateData::httpStateConnClosed(const CommCloseCbParams &params)
 }
 
 void
-HttpStateData::httpTimeout(const CommTimeoutCbParams &params)
+HttpStateData::httpTimeout(const CommTimeoutCbParams &)
 {
-    debugs(11, 4, HERE << serverConnection << ": '" << entry->url() << "'" );
+    debugs(11, 4, serverConnection << ": '" << entry->url() << "'");
 
     if (entry->store_status == STORE_PENDING) {
         fwd->fail(new ErrorState(ERR_READ_TIMEOUT, Http::scGatewayTimeout, fwd->request));
index 26f921b88f305a9d21b3f0cfaaf4623814cc3f8a..98678c5d8c7904b7ba3a6db8ba64f137ff379c2d 100644 (file)
@@ -72,7 +72,7 @@ Http::StatusLine::packInto(Packer * p) const
  * XXX: Note 'end' currently unused, so NULL-termination assumed.
  */
 bool
-Http::StatusLine::parse(const String &protoPrefix, const char *start, const char *end)
+Http::StatusLine::parse(const String &protoPrefix, const char *start, const char * /*end*/)
 {
     status_ = Http::scInvalidHeader;    /* Squid header parsing error */
 
index 5ff6c3cd500e9cbb7ba19d490b0e508b81d46240..57bd39901e35dc419286be874d72f25df1064e04 100644 (file)
@@ -213,7 +213,7 @@ icpLogIcp(const Ip::Address &caddr, LogTags logcode, int len, const char *url, i
 
 /// \ingroup ServerProtocolICPInternal2
 void
-icpUdpSendQueue(int fd, void *unused)
+icpUdpSendQueue(int fd, void *)
 {
     icpUdpData *q;
 
@@ -578,7 +578,7 @@ icpPktDump(icp_common_t * pkt)
 #endif
 
 void
-icpHandleUdp(int sock, void *data)
+icpHandleUdp(int sock, void *)
 {
     int *N = &incoming_sockets_accepted;
 
@@ -707,7 +707,7 @@ icpOpenPorts(void)
 }
 
 static void
-icpIncomingConnectionOpened(const Comm::ConnectionPointer &conn, int errNo)
+icpIncomingConnectionOpened(const Comm::ConnectionPointer &conn, int)
 {
     if (!Comm::IsConnOpen(conn))
         fatal("Cannot open ICP Port");
index 1058062e9127c8fb450f09d343b1b905e9ff8657..0e200e3ef08d42e17bdadaafe8efbc376b61a4c1 100644 (file)
@@ -73,7 +73,7 @@ static void ClientAdd(IdentStateData * state, IDCB * callback, void *callback_da
 Ident::IdentConfig Ident::TheConfig;
 
 void
-Ident::IdentStateData::deleteThis(const char *aReason)
+Ident::IdentStateData::deleteThis(const char *)
 {
     swanSong();
     delete this;
@@ -124,7 +124,7 @@ Ident::Timeout(const CommTimeoutCbParams &io)
 }
 
 void
-Ident::ConnectDone(const Comm::ConnectionPointer &conn, Comm::Flag status, int xerrno, void *data)
+Ident::ConnectDone(const Comm::ConnectionPointer &conn, Comm::Flag status, int, void *data)
 {
     IdentStateData *state = (IdentStateData *)data;
 
@@ -164,7 +164,7 @@ Ident::ConnectDone(const Comm::ConnectionPointer &conn, Comm::Flag status, int x
 }
 
 void
-Ident::WriteFeedback(const Comm::ConnectionPointer &conn, char *buf, size_t len, Comm::Flag flag, int xerrno, void *data)
+Ident::WriteFeedback(const Comm::ConnectionPointer &conn, char *, size_t len, Comm::Flag flag, int xerrno, void *data)
 {
     debugs(30, 5, HERE << conn << ": Wrote IDENT request " << len << " bytes.");
 
@@ -177,7 +177,7 @@ Ident::WriteFeedback(const Comm::ConnectionPointer &conn, char *buf, size_t len,
 }
 
 void
-Ident::ReadReply(const Comm::ConnectionPointer &conn, char *buf, size_t len, Comm::Flag flag, int xerrno, void *data)
+Ident::ReadReply(const Comm::ConnectionPointer &conn, char *buf, size_t len, Comm::Flag flag, int, void *data)
 {
     IdentStateData *state = (IdentStateData *)data;
     char *ident = NULL;
index 27b84c02177119ffd4fec4197d6e239d98c8f963..b65ffc0e1767fda783116ed2b28b2a6687c1b9e0 100644 (file)
@@ -140,7 +140,7 @@ Ip::Intercept::NetfilterInterception(const Comm::ConnectionPointer &newConn, int
 }
 
 bool
-Ip::Intercept::TproxyTransparent(const Comm::ConnectionPointer &newConn, int silent)
+Ip::Intercept::TproxyTransparent(const Comm::ConnectionPointer &newConn, int)
 {
 #if (LINUX_NETFILTER && defined(IP_TRANSPARENT)) || \
     (PF_TRANSPARENT && defined(SO_BINDANY)) || \
@@ -158,7 +158,7 @@ Ip::Intercept::TproxyTransparent(const Comm::ConnectionPointer &newConn, int sil
 }
 
 bool
-Ip::Intercept::IpfwInterception(const Comm::ConnectionPointer &newConn, int silent)
+Ip::Intercept::IpfwInterception(const Comm::ConnectionPointer &newConn, int)
 {
 #if IPFW_TRANSPARENT
     /* The getsockname() call performed already provided the TCP packet details.
index de8fc3907a726047c2b4e1196112f2e04d98551d..c08e7ac03f4ca9ef012c0f6b885cde1e8240bf9c 100644 (file)
@@ -117,7 +117,7 @@ void Ip::Qos::getNfmarkFromServer(const Comm::ConnectionPointer &server, const f
 
 #if USE_LIBNETFILTERCONNTRACK
 int
-Ip::Qos::getNfMarkCallback(enum nf_conntrack_msg_type type,
+Ip::Qos::getNfMarkCallback(enum nf_conntrack_msg_type,
                            struct nf_conntrack *ct,
                            void *data)
 {
index aa284193d37b2e7d8ef6ee3dedf66baa0853a353..34e5c68e66e42d5b73f17d76cf0cfc03ae08c834 100644 (file)
@@ -137,7 +137,7 @@ Ipc::BaseMultiQueue::BaseMultiQueue(const int aLocalProcessId):
 }
 
 void
-Ipc::BaseMultiQueue::clearReaderSignal(const int remoteProcessId)
+Ipc::BaseMultiQueue::clearReaderSignal(const int /*remoteProcessId*/)
 {
     QueueReader &reader = localReader();
     debugs(54, 7, "reader: " << reader.id);
index 52d6b65d741e738004a530e8a89f71ec9e89d77d..682b7f79ea75c22ae06f339d32ac659b7b0295da 100644 (file)
@@ -210,7 +210,7 @@ ipcacheExpiredEntry(ipcache_entry * i)
 
 /// \ingroup IPCacheAPI
 void
-ipcache_purgelru(void *voidnotused)
+ipcache_purgelru(void *)
 {
     dlink_node *m;
     dlink_node *prev = NULL;
index 7cd25535db36ca801e8068df16f9e7cc9b99963f..49dd0c4d79e062ecce566c683198260362ed5c6e 100644 (file)
@@ -88,7 +88,7 @@ logfileFreeBuffer(Logfile * lf, logfile_buffer_t * b)
 }
 
 static void
-logfileHandleWrite(int fd, void *data)
+logfileHandleWrite(int, void *data)
 {
     Logfile *lf = static_cast<Logfile *>(data);
     l_daemon_t *ll = static_cast<l_daemon_t *>(lf->data);
@@ -207,7 +207,7 @@ logfileFlushEvent(void *data)
 /* External code */
 
 int
-logfile_mod_daemon_open(Logfile * lf, const char *path, size_t bufsz, int fatal_flag)
+logfile_mod_daemon_open(Logfile * lf, const char *path, size_t, int)
 {
     const char *args[5];
     char *tmpbuf;
index ce1a7b44d62ad30f3bb89b7ba8adc20bb5f662dd..44e5f07d0c3bf2e7b3f1f3067724655a2f6cfbc0 100644 (file)
@@ -77,7 +77,7 @@ logfile_mod_stdio_writeline(Logfile * lf, const char *buf, size_t len)
 }
 
 static void
-logfile_mod_stdio_linestart(Logfile * lf)
+logfile_mod_stdio_linestart(Logfile *)
 {
 }
 
index b8475b561663549fa692d185bdc8d7a75121eb65..9400b05831216a600133c3c97b6eebc2b957be64 100644 (file)
@@ -98,34 +98,34 @@ typedef struct {
 #define PRIORITY_MASK (LOG_ERR | LOG_WARNING | LOG_NOTICE | LOG_INFO | LOG_DEBUG)
 
 static void
-logfile_mod_syslog_writeline(Logfile * lf, const char *buf, size_t len)
+logfile_mod_syslog_writeline(Logfile * lf, const char *buf, size_t)
 {
     l_syslog_t *ll = (l_syslog_t *) lf->data;
     syslog(ll->syslog_priority, "%s", (char *) buf);
 }
 
 static void
-logfile_mod_syslog_linestart(Logfile * lf)
+logfile_mod_syslog_linestart(Logfile *)
 {
 }
 
 static void
-logfile_mod_syslog_lineend(Logfile * lf)
+logfile_mod_syslog_lineend(Logfile *)
 {
 }
 
 static void
-logfile_mod_syslog_flush(Logfile * lf)
+logfile_mod_syslog_flush(Logfile *)
 {
 }
 
 static void
-logfile_mod_syslog_rotate(Logfile * lf)
+logfile_mod_syslog_rotate(Logfile *)
 {
 }
 
 static void
-logfile_mod_syslog_close(Logfile * lf)
+logfile_mod_syslog_close(Logfile *lf)
 {
     xfree(lf->data);
     lf->data = NULL;
@@ -135,7 +135,7 @@ logfile_mod_syslog_close(Logfile * lf)
  * This code expects the path to be syslog:<priority>
  */
 int
-logfile_mod_syslog_open(Logfile * lf, const char *path, size_t bufsz, int fatal_flag)
+logfile_mod_syslog_open(Logfile * lf, const char *path, size_t, int)
 {
     lf->f_close = logfile_mod_syslog_close;
     lf->f_linewrite = logfile_mod_syslog_writeline;
index 1daad07fa0b9f2fd897e354be862f18835361b60..f4506ff349826c8ca24620edb5fdf2f144352297 100644 (file)
@@ -94,19 +94,18 @@ logfile_mod_udp_writeline(Logfile * lf, const char *buf, size_t len)
 }
 
 static void
-logfile_mod_udp_linestart(Logfile * lf)
+logfile_mod_udp_linestart(Logfile *)
 {
 }
 
 static void
-logfile_mod_udp_lineend(Logfile * lf)
+logfile_mod_udp_lineend(Logfile *)
 {
 }
 
 static void
-logfile_mod_udp_rotate(Logfile * lf)
+logfile_mod_udp_rotate(Logfile *)
 {
-    return;
 }
 
 static void
index bc8f7414a884eaaeece57c378be521abc07a1da0..2565623efcc2ffcc93ad66b0be441f886e9aef44 100644 (file)
@@ -363,7 +363,7 @@ Log::TcpLogger::writeDone(const CommIoCbParams &io)
 /// This is our comm_close_handler. It is called when some external force
 /// (e.g., reconfigure or shutdown) is closing the connection (rather than us).
 void
-Log::TcpLogger::handleClosure(const CommCloseCbParams &io)
+Log::TcpLogger::handleClosure(const CommCloseCbParams &)
 {
     assert(inCall != NULL);
     closer = NULL;
@@ -411,7 +411,7 @@ Log::TcpLogger::WriteLine(Logfile * lf, const char *buf, size_t len)
 }
 
 void
-Log::TcpLogger::StartLine(Logfile * lf)
+Log::TcpLogger::StartLine(Logfile *)
 {
 }
 
@@ -423,7 +423,7 @@ Log::TcpLogger::EndLine(Logfile * lf)
 }
 
 void
-Log::TcpLogger::Rotate(Logfile * lf)
+Log::TcpLogger::Rotate(Logfile *)
 {
 }
 
index bc7bb62ac449ceff472a53ba457f9677627f97c8..5e9357d3bcde457063d8f421f4b18a81d6fdc012 100644 (file)
@@ -185,7 +185,7 @@ class StoreRootEngine : public AsyncEngine
 {
 
 public:
-    int checkEvents(int timeout) {
+    int checkEvents(int) {
         Store::Root().callback();
         return EVENT_IDLE;
     };
@@ -207,7 +207,7 @@ private:
 };
 
 int
-SignalEngine::checkEvents(int timeout)
+SignalEngine::checkEvents(int)
 {
     PROF_start(SignalEngine_checkEvents);
 
index 2306b14de3b479e7dfd9028f11dac4fb0420cc36..0665ae63a770b248b507d7e147b14ff17a1b71aa 100644 (file)
@@ -217,7 +217,7 @@ public:
      \note  As a general guideline, increase chunk size only for pools that keep
      *      very many items for relatively long time.
      */
-    virtual void setChunkSize(size_t chunksize) {}
+    virtual void setChunkSize(size_t) {}
 
     /**
      \param minSize Minimum size needed to be allocated.
index 9364b1eb9963f4b4e5695ed710634e7acf872b1c..6ed4017dcef77498bd803474089b55315c28d0e0 100644 (file)
@@ -321,7 +321,7 @@ MemPoolChunked::allocate()
 }
 
 void
-MemPoolChunked::deallocate(void *obj, bool aggressive)
+MemPoolChunked::deallocate(void *obj, bool)
 {
     push(obj);
     assert(meter.inuse.level > 0);
index c514ec75906669244155f62ffc64b782cae883d0..2e55d151e2d2b463ad2017c3b71e2d3f450e94b2 100644 (file)
@@ -106,7 +106,7 @@ MemPoolMalloc::idleTrigger(int shift) const
 }
 
 void
-MemPoolMalloc::clean(time_t maxage)
+MemPoolMalloc::clean(time_t)
 {
     while (!freelist.empty()) {
         void *obj = freelist.top();
index 1a46962b15f82587bee81eadf9f9048091d85e59..e4b6ca22004b9ac6116435267612681a53d85f2f 100644 (file)
@@ -177,7 +177,7 @@ Mem::Stats(StoreEntry * sentry)
  * Relies on Mem::Init() having been called beforehand.
  */
 void
-memDataInit(mem_type type, const char *name, size_t size, int max_pages_notused, bool doZero)
+memDataInit(mem_type type, const char *name, size_t size, int, bool doZero)
 {
     assert(name && size);
 
@@ -360,7 +360,7 @@ memFreeBuf(size_t size, void *buf)
 static double clean_interval = 15.0;    /* time to live of idle chunk before release */
 
 void
-Mem::CleanIdlePools(void *unused)
+Mem::CleanIdlePools(void *)
 {
     MemPools::GetInstance().clean(static_cast<time_t>(clean_interval));
     eventAdd("memPoolCleanIdlePools", CleanIdlePools, NULL, clean_interval, 1);
index f64ccf7bbf94490885beb32523467af4c9f42488..2d6d0a784501a185ddf68b75639e6664b5787e6c 100644 (file)
@@ -60,12 +60,12 @@ Mgr::Action::createStoreEntry() const
 }
 
 void
-Mgr::Action::add(const Action& action)
+Mgr::Action::add(const Action &)
 {
 }
 
 void
-Mgr::Action::respond(const Requestrequest)
+Mgr::Action::respond(const Request &request)
 {
     debugs(16, 5, HERE);
 
index 6131524f0399c38f29807bd4d56e633b8c152b6c..5f32fe55658d3907c39719c51afdaf508b99345b 100644 (file)
@@ -49,9 +49,10 @@ public:
     virtual void respond(const Request &request);
 
     /// pack collected action info into a message to be sent to Coordinator
-    virtual void pack(Ipc::TypedMsgHdr &msg) const {}
+    virtual void pack(Ipc::TypedMsgHdr &) const {}
+
     /// unpack action info from the message received by Coordinator
-    virtual void unpack(const Ipc::TypedMsgHdr &msg) {}
+    virtual void unpack(const Ipc::TypedMsgHdr &) {}
 
     /// notify Coordinator that this action is done with local processing
     void sendResponse(unsigned int requestId);
@@ -79,7 +80,7 @@ protected:
      * may collect info during dump, especially if collect() did nothing
      * non-atomic() actions may continue writing asynchronously after returning
      */
-    virtual void dump(StoreEntry *entry) {}
+    virtual void dump(StoreEntry *) {}
 
 private:
     const CommandPointer cmd; ///< the command that caused this action
index 3c653d6f1dbaf8a835f981cd601a3918bad8959b..d869335ef4e2a084702346160a968c915c6622f3 100644 (file)
@@ -31,7 +31,7 @@ Mgr::IndexAction::IndexAction(const Command::Pointer &aCmd): Action(aCmd)
 }
 
 void
-Mgr::IndexAction::dump(StoreEntry* entry)
+Mgr::IndexAction::dump(StoreEntry *)
 {
     debugs(16, 5, HERE);
 }
@@ -75,7 +75,7 @@ Mgr::ShutdownAction::ShutdownAction(const Command::Pointer &aCmd): Action(aCmd)
 }
 
 void
-Mgr::ShutdownAction::dump(StoreEntry* entry)
+Mgr::ShutdownAction::dump(StoreEntry *)
 {
     debugs(16, DBG_CRITICAL, "Shutdown by Cache Manager command.");
     shut_down(SIGTERM);
index 53507d791ddda873e4e54f09a3ef1dae61354f86..02f9a991b7117226c6ebf11f3163bc2b2d822933 100644 (file)
@@ -86,7 +86,7 @@ Mgr::Forwarder::handleTimeout()
 }
 
 void
-Mgr::Forwarder::handleException(const std::exceptione)
+Mgr::Forwarder::handleException(const std::exception &e)
 {
     if (entry != NULL && httpRequest != NULL && Comm::IsConnOpen(conn))
         sendError(new ErrorState(ERR_INVALID_RESP, Http::scInternalServerError, httpRequest));
@@ -95,7 +95,7 @@ Mgr::Forwarder::handleException(const std::exception& e)
 
 /// called when the client socket gets closed by some external force
 void
-Mgr::Forwarder::noteCommClosed(const CommCloseCbParams& params)
+Mgr::Forwarder::noteCommClosed(const CommCloseCbParams &)
 {
     debugs(16, 5, HERE);
     conn = NULL; // needed?
index 66b37c15bfb25924906a1b13b932840e0713d482..07da0a447a1d0e1c83d9d15b5df57441b0890c64 100644 (file)
@@ -126,7 +126,7 @@ Mgr::StoreToCommWriter::noteCommWrote(const CommIoCbParams& params)
 }
 
 void
-Mgr::StoreToCommWriter::noteCommClosed(const CommCloseCbParams& params)
+Mgr::StoreToCommWriter::noteCommClosed(const CommCloseCbParams &)
 {
     debugs(16, 6, HERE);
     Must(!Comm::IsConnOpen(clientConnection));
index 2809bb749845a541024846a4120f738bb2bf5d56..f808680c46d3be2ad62610b23f07e7f49b131689 100644 (file)
@@ -437,7 +437,7 @@ MimeEntry::MimeEntry(const char *aPattern, const regex_t &compiledPattern,
     content_type(xstrdup(aContentType)),
     content_encoding(xstrdup(aContentEncoding)),
     view_option(optionViewEnable),
-    download_option(optionViewEnable),
+    download_option(optionDownloadEnable),
     theIcon(anIconName), next(NULL)
 {
     if (!strcasecmp(aTransferMode, "ascii"))
index 9fb2f160c2b53e0cf9090d3d92e8628da26263bb..921b4c2bf8fe3b61a20a6f66afccb1dde00b4d6c 100644 (file)
@@ -31,7 +31,7 @@ mcastSetTtl(int fd, int mcast_ttl)
 }
 
 void
-mcastJoinGroups(const ipcache_addrs *ia, const DnsLookupDetails &, void *datanotused)
+mcastJoinGroups(const ipcache_addrs *ia, const DnsLookupDetails &, void *)
 {
 #ifdef IP_MULTICAST_TTL
     struct ip_mreq mr;
index e5612927e73ec70da592df76329bd590ed0e90ff..b8b4ae7a81c1871baa56b96680ff7b70e5f90b03 100644 (file)
@@ -869,7 +869,7 @@ peerNoteDigestLookup(HttpRequest * request, CachePeer * p, lookup_t lookup)
 }
 
 static void
-neighborAlive(CachePeer * p, const MemObject * mem, const icp_common_t * header)
+neighborAlive(CachePeer * p, const MemObject *, const icp_common_t * header)
 {
     peerAlive(p);
     ++ p->stats.pings_acked;
@@ -906,7 +906,7 @@ neighborUpdateRtt(CachePeer * p, MemObject * mem)
 
 #if USE_HTCP
 static void
-neighborAliveHtcp(CachePeer * p, const MemObject * mem, const HtcpReplyData * htcp)
+neighborAliveHtcp(CachePeer * p, const MemObject *, const HtcpReplyData * htcp)
 {
     peerAlive(p);
     ++ p->stats.pings_acked;
@@ -1353,7 +1353,7 @@ peerProbeConnect(CachePeer * p)
 }
 
 static void
-peerProbeConnectDone(const Comm::ConnectionPointer &conn, Comm::Flag status, int xerrno, void *data)
+peerProbeConnectDone(const Comm::ConnectionPointer &conn, Comm::Flag status, int, void *data)
 {
     CachePeer *p = (CachePeer*)data;
 
@@ -1452,19 +1452,17 @@ peerCountMcastPeersDone(void *data)
 }
 
 static void
-peerCountHandleIcpReply(CachePeer * p, peer_t type, AnyP::ProtocolType proto, void *hdrnotused, void *data)
+peerCountHandleIcpReply(CachePeer * p, peer_t, AnyP::ProtocolType proto, void *, void *data)
 {
-    int rtt_av_factor;
-
     ps_state *psstate = (ps_state *)data;
     StoreEntry *fake = psstate->entry;
+    assert(fake);
     MemObject *mem = fake->mem_obj;
+    assert(mem);
     int rtt = tvSubMsec(mem->start_ping, current_time);
     assert(proto == AnyP::PROTO_ICP);
-    assert(fake);
-    assert(mem);
     ++ psstate->ping.n_recv;
-    rtt_av_factor = RTT_AV_FACTOR;
+    int rtt_av_factor = RTT_AV_FACTOR;
 
     if (p->options.weighted_roundrobin)
         rtt_av_factor = RTT_BACKGROUND_AV_FACTOR;
index bf4705525d09013e5f8b00a8ca2df47b4b2c6472..9dc96e351360c25d0503544b0c950e9e702e2029 100644 (file)
@@ -289,7 +289,7 @@ IdleConnList::findAndClose(const Comm::ConnectionPointer &conn)
 }
 
 void
-IdleConnList::Read(const Comm::ConnectionPointer &conn, char *buf, size_t len, Comm::Flag flag, int xerrno, void *data)
+IdleConnList::Read(const Comm::ConnectionPointer &conn, char *, size_t len, Comm::Flag flag, int, void *data)
 {
     debugs(48, 3, HERE << len << " bytes from " << conn);
 
index 2b4e6c4f942ae3c350933f7e4c7c36f0ac97d768..57d021e2250209f2c18c57658857e5071e59fae1 100644 (file)
@@ -25,7 +25,7 @@
 static IPH send_announce;
 
 void
-start_announce(void *datanotused)
+start_announce(void *)
 {
     if (0 == Config.onoff.announce)
         return;
@@ -39,7 +39,7 @@ start_announce(void *datanotused)
 }
 
 static void
-send_announce(const ipcache_addrs *ia, const DnsLookupDetails &, void *junk)
+send_announce(const ipcache_addrs *ia, const DnsLookupDetails &, void *)
 {
     LOCAL_ARRAY(char, tbuf, 256);
     LOCAL_ARRAY(char, sndbuf, BUFSIZ);
index 10c79b23d078e351c8d90ed707f7a33452820c6c..3bc3122cd876bb375ed4f3189088fd43e8ac35ed 100644 (file)
@@ -149,7 +149,7 @@ Ftp::Server::doProcessRequest()
 }
 
 void
-Ftp::Server::processParsedRequest(ClientSocketContext *context)
+Ftp::Server::processParsedRequest(ClientSocketContext *)
 {
     Must(getConcurrentRequestCount() == 1);
 
@@ -1128,7 +1128,7 @@ Ftp::Server::writeForwardedForeign(const HttpReply *reply)
 }
 
 void
-Ftp::Server::writeControlMsgAndCall(ClientSocketContext *context, HttpReply *reply, AsyncCall::Pointer &call)
+Ftp::Server::writeControlMsgAndCall(ClientSocketContext *, HttpReply *reply, AsyncCall::Pointer &call)
 {
     // the caller guarantees that we are dealing with the current context only
     // the caller should also make sure reply->header.has(HDR_FTP_STATUS)
@@ -1188,7 +1188,7 @@ Ftp::Server::writeForwardedReplyAndCall(const HttpReply *reply, AsyncCall::Point
 }
 
 static void
-Ftp::PrintReply(MemBuf &mb, const HttpReply *reply, const char *const prefix)
+Ftp::PrintReply(MemBuf &mb, const HttpReply *reply, const char *const)
 {
     const HttpHeader &header = reply->header;
 
@@ -1335,7 +1335,7 @@ Ftp::Server::handleRequest(HttpRequest *request)
 /// Called to parse USER command, which is required to create an HTTP request
 /// wrapper. W/o request, the errors are handled by returning earlyError().
 ClientSocketContext *
-Ftp::Server::handleUserRequest(const SBuf &cmd, SBuf &params)
+Ftp::Server::handleUserRequest(const SBuf &, SBuf &params)
 {
     if (params.isEmpty())
         return earlyError(eekMissingUsername);
@@ -1383,14 +1383,14 @@ Ftp::Server::handleUserRequest(const SBuf &cmd, SBuf &params)
 }
 
 bool
-Ftp::Server::handleFeatRequest(String &cmd, String &params)
+Ftp::Server::handleFeatRequest(String &, String &)
 {
     changeState(fssHandleFeat, "handleFeatRequest");
     return true;
 }
 
 bool
-Ftp::Server::handlePasvRequest(String &cmd, String &params)
+Ftp::Server::handlePasvRequest(String &, String &params)
 {
     if (gotEpsvAll) {
         setReply(500, "Bad PASV command");
@@ -1444,7 +1444,7 @@ Ftp::Server::createDataConnection(Ip::Address cltAddr)
 }
 
 bool
-Ftp::Server::handlePortRequest(String &cmd, String &params)
+Ftp::Server::handlePortRequest(String &, String &params)
 {
     // TODO: Should PORT errors trigger closeDataConnection() cleanup?
 
@@ -1473,7 +1473,7 @@ Ftp::Server::handlePortRequest(String &cmd, String &params)
 }
 
 bool
-Ftp::Server::handleDataRequest(String &cmd, String &params)
+Ftp::Server::handleDataRequest(String &, String &)
 {
     if (!checkDataConnPre())
         return false;
@@ -1484,7 +1484,7 @@ Ftp::Server::handleDataRequest(String &cmd, String &params)
 }
 
 bool
-Ftp::Server::handleUploadRequest(String &cmd, String &params)
+Ftp::Server::handleUploadRequest(String &, String &)
 {
     if (!checkDataConnPre())
         return false;
@@ -1515,7 +1515,7 @@ Ftp::Server::handleUploadRequest(String &cmd, String &params)
 }
 
 bool
-Ftp::Server::handleEprtRequest(String &cmd, String &params)
+Ftp::Server::handleEprtRequest(String &, String &params)
 {
     debugs(9, 3, "Process an EPRT " << params);
 
@@ -1544,7 +1544,7 @@ Ftp::Server::handleEprtRequest(String &cmd, String &params)
 }
 
 bool
-Ftp::Server::handleEpsvRequest(String &cmd, String &params)
+Ftp::Server::handleEpsvRequest(String &, String &params)
 {
     debugs(9, 3, "Process an EPSV command with params: " << params);
     if (params.size() <= 0) {
@@ -1569,21 +1569,21 @@ Ftp::Server::handleEpsvRequest(String &cmd, String &params)
 }
 
 bool
-Ftp::Server::handleCwdRequest(String &cmd, String &params)
+Ftp::Server::handleCwdRequest(String &, String &)
 {
     changeState(fssHandleCwd, "handleCwdRequest");
     return true;
 }
 
 bool
-Ftp::Server::handlePassRequest(String &cmd, String &params)
+Ftp::Server::handlePassRequest(String &, String &)
 {
     changeState(fssHandlePass, "handlePassRequest");
     return true;
 }
 
 bool
-Ftp::Server::handleCdupRequest(String &cmd, String &params)
+Ftp::Server::handleCdupRequest(String &, String &)
 {
     changeState(fssHandleCdup, "handleCdupRequest");
     return true;
index a609c0e28637752731f6ea40609cfbdac6332dfb..b6b29b926fdc8c559cd281a4e1cf1bcc14fa8844 100644 (file)
@@ -300,7 +300,7 @@ snmpOpenPorts(void)
 }
 
 static void
-snmpPortOpened(const Comm::ConnectionPointer &conn, int errNo)
+snmpPortOpened(const Comm::ConnectionPointer &conn, int)
 {
     if (!Comm::IsConnOpen(conn))
         fatalf("Cannot open SNMP %s Port",(conn->fd == snmpIncomingConn->fd?"receiving":"sending"));
@@ -340,7 +340,7 @@ snmpClosePorts(void)
  * Accept the UDP packet
  */
 void
-snmpHandleUdp(int sock, void *not_used)
+snmpHandleUdp(int sock, void *)
 {
     static char buf[SNMP_REQUEST_SIZE];
     Ip::Address from;
index 5d7b8743ac1968344e7a536019cba57c5f942681..bfb9d2953525eeafd91cc87ad188080a3c1d0e43 100644 (file)
@@ -806,7 +806,6 @@ void
 DumpMallocStatistics(StoreEntry* sentry)
 {
 #if XMALLOC_STATISTICS
-
     xm_deltat = current_dtime - xm_time;
     xm_time = current_dtime;
     storeAppendPrintf(sentry, "\nMemory allocation statistics\n");
@@ -1255,7 +1254,7 @@ statInit(void)
 }
 
 static void
-statAvgTick(void *notused)
+statAvgTick(void *)
 {
     StatCounters *t = &CountHist[0];
     StatCounters *p = &CountHist[1];
index 05877e09591d417b872d8261d427d63c3e6587f3..7a17a7132ffe5cd865a117a942a025ffd0e1da90 100644 (file)
@@ -127,7 +127,7 @@ Store::Root(StorePointer aRoot)
 void
 Store::Stats(StoreEntry * output)
 {
-    assert (output);
+    assert(output);
     Root().stat(*output);
 }
 
@@ -144,7 +144,7 @@ Store::sync()
 {}
 
 void
-Store::unlink (StoreEntry &anEntry)
+Store::unlink(StoreEntry &)
 {
     fatal("Store::unlink on invalid Store\n");
 }
@@ -152,7 +152,7 @@ Store::unlink (StoreEntry &anEntry)
 void *
 StoreEntry::operator new (size_t bytecount)
 {
-    assert (bytecount == sizeof (StoreEntry));
+    assert(bytecount == sizeof (StoreEntry));
 
     if (!pool) {
         pool = memPoolCreate ("StoreEntry", bytecount);
@@ -279,13 +279,13 @@ StoreEntry::bytesWanted (Range<size_t> const aRange, bool ignoreDelayPools) cons
 }
 
 bool
-StoreEntry::checkDeferRead(int fd) const
+StoreEntry::checkDeferRead(int) const
 {
     return (bytesWanted(Range<size_t>(0,INT_MAX)) == 0);
 }
 
 void
-StoreEntry::setNoDelay (bool const newValue)
+StoreEntry::setNoDelay(bool const newValue)
 {
     if (mem_obj)
         mem_obj->setNoDelay(newValue);
@@ -1195,7 +1195,7 @@ storeGetMemSpace(int size)
  * it becomes active will self register
  */
 void
-Store::Maintain(void *notused)
+Store::Maintain(void *)
 {
     Store::Root().maintain();
 
@@ -1287,7 +1287,7 @@ StoreEntry::release()
 }
 
 static void
-storeLateRelease(void *unused)
+storeLateRelease(void *)
 {
     StoreEntry *e;
     static int n = 0;
@@ -1934,7 +1934,7 @@ StoreEntry::transientsAbandonmentCheck()
 }
 
 void
-StoreEntry::memOutDecision(const bool willCacheInRam)
+StoreEntry::memOutDecision(const bool)
 {
     transientsAbandonmentCheck();
 }
index 889be3a01342256b9bd9e0967816c5ce98accec0..cbb787499c208481c6af8c74f2ac0775e5881060 100644 (file)
@@ -459,7 +459,7 @@ store_client::fileRead()
 }
 
 void
-store_client::readBody(const char *buf, ssize_t len)
+store_client::readBody(const char *, ssize_t len)
 {
     int parsed_header = 0;
 
@@ -513,14 +513,14 @@ store_client::fail()
 }
 
 static void
-storeClientReadHeader(void *data, const char *buf, ssize_t len, StoreIOState::Pointer self)
+storeClientReadHeader(void *data, const char *buf, ssize_t len, StoreIOState::Pointer)
 {
     store_client *sc = (store_client *)data;
     sc->readHeader(buf, len);
 }
 
 static void
-storeClientReadBody(void *data, const char *buf, ssize_t len, StoreIOState::Pointer self)
+storeClientReadBody(void *data, const char *buf, ssize_t len, StoreIOState::Pointer)
 {
     store_client *sc = (store_client *)data;
     sc->readBody(buf, len);
index 48b73d2f430dbb0f677cbdd6949160a5a6cd806c..7aa957dd875240f4082601dce9ce74bca1f3a4ad 100644 (file)
@@ -748,7 +748,7 @@ StoreController::find(const cache_key *key)
 }
 
 void
-StoreController::get(String const key, STOREGETCLIENT aCallback, void *aCallbackData)
+StoreController::get(String const, STOREGETCLIENT, void *)
 {
     fatal("not implemented");
 }
@@ -1079,7 +1079,7 @@ StoreHashIndex::get(const cache_key *key)
 }
 
 void
-StoreHashIndex::get(String const key, STOREGETCLIENT aCallback, void *aCallbackData)
+StoreHashIndex::get(String const, STOREGETCLIENT, void *)
 {
     fatal("not implemented");
 }
index f39a56f286005fa3eb3cc3274305d18d8dfd56f6..8421e4378ea021bd96256a93bb587a61d905b10c 100644 (file)
@@ -48,7 +48,7 @@ storeCleanupDoubleCheck(StoreEntry * e)
 }
 
 static void
-storeCleanup(void *datanotused)
+storeCleanup(void *)
 {
     static int store_errors = 0;
     static StoreSearchPointer currentSearch;
index 39a4e33f91a95650c58076834ff535b6150e2135..6cd120a510549cdcaf1cd7e836528e9022fca73a 100644 (file)
@@ -51,7 +51,7 @@ storeSwapInStart(store_client * sc)
 }
 
 static void
-storeSwapInFileClosed(void *data, int errflag, StoreIOState::Pointer self)
+storeSwapInFileClosed(void *data, int errflag, StoreIOState::Pointer)
 {
     store_client *sc = (store_client *)data;
     debugs(20, 3, "storeSwapInFileClosed: sio=" << sc->swapin_sio.getRaw() << ", errflag=" << errflag);
@@ -66,7 +66,7 @@ storeSwapInFileClosed(void *data, int errflag, StoreIOState::Pointer self)
 }
 
 static void
-storeSwapInFileNotify(void *data, int errflag, StoreIOState::Pointer self)
+storeSwapInFileNotify(void *data, int, StoreIOState::Pointer)
 {
     store_client *sc = (store_client *)data;
     StoreEntry *e = sc->entry;
index 2855c330907779afcd75b7466ed5b68b3373b17a..914fa1698d8dd98e0794a260f53aad08b7d6a99e 100644 (file)
@@ -30,22 +30,21 @@ int Debug::log_stderr = 1;
 bool Debug::log_syslog = false;
 
 Ctx
-ctx_enter(const char *descr)
+ctx_enter(const char *)
 {
     return -1;
 }
 
 void
-ctx_exit(Ctx ctx)
-{
-}
+ctx_exit(Ctx)
+{}
 
 void
-_db_init(const char *logfile, const char *options)
+_db_init(const char *, const char *)
 {}
 
 void
-_db_set_syslog(const char *facility)
+_db_set_syslog(const char *)
 {}
 
 void
@@ -109,9 +108,7 @@ Debug::getDebugOut()
 
 void
 Debug::parseOptions(char const *)
-{
-    return;
-}
+{}
 
 void
 Debug::finishDebug()
@@ -132,7 +129,6 @@ Debug::finishDebug()
 void
 Debug::xassert(const char *msg, const char *file, int line)
 {
-
     if (CurrentDebug) {
         *CurrentDebug << "assertion failed: " << file << ":" << line <<
                       ": \"" << msg << "\"";
index a6d1c5ba5d909e6bac61cf2c98d72f9800e1d608..5237b41a61facb60590c1c5d1186bcc3fbb2313c 100644 (file)
@@ -435,7 +435,7 @@ sig_child(int sig)
 }
 
 void
-sig_shutdown(int sig)
+sig_shutdown(int)
 {
     shutting_down = 1;
 }
index 601c945f227223caa5a3c66fdc599a9a1d6ebb69..f7aee36ef9e4909370468fd0dec9fa418be3ce07 100644 (file)
@@ -325,7 +325,7 @@ TunnelStateData::ReadServer(const Comm::ConnectionPointer &c, char *buf, size_t
 }
 
 void
-TunnelStateData::readServer(char *buf, size_t len, Comm::Flag errcode, int xerrno)
+TunnelStateData::readServer(char *, size_t len, Comm::Flag errcode, int xerrno)
 {
     debugs(26, 3, HERE << server.conn << ", read " << len << " bytes, err=" << errcode);
 
@@ -349,7 +349,7 @@ TunnelStateData::readServer(char *buf, size_t len, Comm::Flag errcode, int xerrn
 
 /// Called when we read [a part of] CONNECT response from the peer
 void
-TunnelStateData::readConnectResponseDone(char *buf, size_t len, Comm::Flag errcode, int xerrno)
+TunnelStateData::readConnectResponseDone(char *, size_t len, Comm::Flag errcode, int xerrno)
 {
     debugs(26, 3, server.conn << ", read " << len << " bytes, err=" << errcode);
     assert(waitingForConnectResponse());
@@ -470,7 +470,7 @@ TunnelStateData::ReadClient(const Comm::ConnectionPointer &, char *buf, size_t l
 }
 
 void
-TunnelStateData::readClient(char *buf, size_t len, Comm::Flag errcode, int xerrno)
+TunnelStateData::readClient(char *, size_t len, Comm::Flag errcode, int xerrno)
 {
     debugs(26, 3, HERE << client.conn << ", read " << len << " bytes, err=" << errcode);
 
@@ -556,7 +556,7 @@ TunnelStateData::WriteServerDone(const Comm::ConnectionPointer &, char *buf, siz
 }
 
 void
-TunnelStateData::writeServerDone(char *buf, size_t len, Comm::Flag flag, int xerrno)
+TunnelStateData::writeServerDone(char *, size_t len, Comm::Flag flag, int xerrno)
 {
     debugs(26, 3, HERE  << server.conn << ", " << len << " bytes written, flag=" << flag);
 
@@ -617,7 +617,7 @@ TunnelStateData::Connection::dataSent(size_t amount)
 }
 
 void
-TunnelStateData::writeClientDone(char *buf, size_t len, Comm::Flag flag, int xerrno)
+TunnelStateData::writeClientDone(char *, size_t len, Comm::Flag flag, int xerrno)
 {
     debugs(26, 3, HERE << client.conn << ", " << len << " bytes written, flag=" << flag);
 
@@ -735,7 +735,7 @@ tunnelStartShoveling(TunnelStateData *tunnelState)
  * Call the tunnelStartShoveling to start the blind pump.
  */
 static void
-tunnelConnectedWriteDone(const Comm::ConnectionPointer &conn, char *buf, size_t size, Comm::Flag flag, int xerrno, void *data)
+tunnelConnectedWriteDone(const Comm::ConnectionPointer &conn, char *, size_t, Comm::Flag flag, int, void *data)
 {
     TunnelStateData *tunnelState = (TunnelStateData *)data;
     debugs(26, 3, HERE << conn << ", flag=" << flag);
@@ -751,7 +751,7 @@ tunnelConnectedWriteDone(const Comm::ConnectionPointer &conn, char *buf, size_t
 
 /// Called when we are done writing CONNECT request to a peer.
 static void
-tunnelConnectReqWriteDone(const Comm::ConnectionPointer &conn, char *buf, size_t size, Comm::Flag flag, int xerrno, void *data)
+tunnelConnectReqWriteDone(const Comm::ConnectionPointer &conn, char *, size_t, Comm::Flag flag, int, void *data)
 {
     TunnelStateData *tunnelState = (TunnelStateData *)data;
     debugs(26, 3, conn << ", flag=" << flag);
index 6e662df7e056e478bc65ccb24b8d4b5b38deadea..248eebae9761b181865af11c0985c36d6263382d 100644 (file)
@@ -47,7 +47,7 @@
  \retval OK  The file has been removed.
  */
 int
-main(int argc, char *argv[])
+main(int, char *[])
 {
     char buf[UNLINK_BUF_LEN];
     char *t;
index c15a8e494020ab7c0a52187f2c0754e68c036074..784dd4f221b04612b697b101d2898ee29b0eb915 100644 (file)
@@ -82,7 +82,7 @@ UrnState::~UrnState()
 }
 
 static url_entry *
-urnFindMinRtt(url_entry * urls, const HttpRequestMethod& m, int *rtt_ret)
+urnFindMinRtt(url_entry * urls, const HttpRequestMethod &, int *rtt_ret)
 {
     int min_rtt = 0;
     url_entry *u = NULL;
index 9feb9f5ccb014a51837d51e5cf8c43345191ae5d..b729810e01710c65b2cbc4015c615923d2b2e628 100644 (file)
@@ -174,7 +174,7 @@ wccpConnectionClose(void)
  * Accept the UDP packet
  */
 static void
-wccpHandleUdp(int sock, void *not_used)
+wccpHandleUdp(int sock, void *)
 {
     Ip::Address from;
     int len;
@@ -271,7 +271,7 @@ wccpLowestIP(void)
 }
 
 static void
-wccpHereIam(void *voidnotused)
+wccpHereIam(void *)
 {
     debugs(80, 6, "wccpHereIam: Called");
 
index c82cd9b0404a720e3cc370812143f89095a759fd..e4e602f1bf971d1d661c643aee9b62fbc5832429 100644 (file)
@@ -1107,9 +1107,8 @@ wccp2ConnectionClose(void)
  * Accept the UDP packet
  */
 static void
-wccp2HandleUdp(int sock, void *not_used)
+wccp2HandleUdp(int sock, void *)
 {
-
     struct wccp2_service_list_t *service_list_ptr;
 
     struct wccp2_router_list_t *router_list_ptr;
@@ -1514,9 +1513,8 @@ wccp2HandleUdp(int sock, void *not_used)
 }
 
 static void
-wccp2HereIam(void *voidnotused)
+wccp2HereIam(void *)
 {
-
     struct wccp2_service_list_t *service_list_ptr;
 
     struct wccp2_router_list_t *router_list_ptr;
@@ -1599,9 +1597,8 @@ wccp2HereIam(void *voidnotused)
 }
 
 static void
-wccp2AssignBuckets(void *voidnotused)
+wccp2AssignBuckets(void *)
 {
-
     struct wccp2_service_list_t *service_list_ptr;
 
     struct wccp2_router_list_t *router_list_ptr;
@@ -2031,7 +2028,7 @@ dump_wccp2_method(StoreEntry * e, const char *label, int v)
 }
 
 void
-free_wccp2_method(int *v)
+free_wccp2_method(int *)
 { }
 
 /**
@@ -2078,8 +2075,8 @@ dump_wccp2_amethod(StoreEntry * e, const char *label, int v)
 }
 
 void
-free_wccp2_amethod(int *v)
-{ }
+free_wccp2_amethod(int *)
+{}
 
 /*
  * Format:
@@ -2087,7 +2084,7 @@ free_wccp2_amethod(int *v)
  * wccp2_service {standard|dynamic} {id} (password=password)
  */
 void
-parse_wccp2_service(void *v)
+parse_wccp2_service(void *)
 {
     char *t;
     int service = 0;
@@ -2138,9 +2135,8 @@ parse_wccp2_service(void *v)
 }
 
 void
-dump_wccp2_service(StoreEntry * e, const char *label, void *v)
+dump_wccp2_service(StoreEntry * e, const char *label, void *)
 {
-
     struct wccp2_service_list_t *srv;
     srv = wccp2_service_list_head;
 
@@ -2161,11 +2157,11 @@ dump_wccp2_service(StoreEntry * e, const char *label, void *v)
 }
 
 void
-free_wccp2_service(void *v)
+free_wccp2_service(void *)
 {}
 
 int
-check_null_wccp2_service(void *v)
+check_null_wccp2_service(void *)
 {
     return !wccp2_service_list_head;
 }
@@ -2258,7 +2254,7 @@ parse_wccp2_service_ports(char *options, int portlist[])
 }
 
 void
-parse_wccp2_service_info(void *v)
+parse_wccp2_service_info(void *)
 {
     char *t, *end;
     int service_id = 0;
@@ -2337,7 +2333,7 @@ parse_wccp2_service_info(void *v)
 }
 
 void
-dump_wccp2_service_info(StoreEntry * e, const char *label, void *v)
+dump_wccp2_service_info(StoreEntry * e, const char *label, void *)
 {
     char comma;
 
@@ -2509,7 +2505,7 @@ wccp2SortCacheList(struct wccp2_cache_list_t *head)
 }
 
 void
-free_wccp2_service_info(void *v)
+free_wccp2_service_info(void *)
 {}
 
 #endif /* USE_WCCPv2 */
index bebea5be0b416e77689e6dd749fad740e755fb89..631a8e4d611552bc0503604785661b3f97d25db3 100644 (file)
@@ -48,7 +48,7 @@ static IOCB whoisReadReply;
 /* PUBLIC */
 
 static void
-whoisWriteComplete(const Comm::ConnectionPointer &, char *buf, size_t size, Comm::Flag flag, int xerrno, void *data)
+whoisWriteComplete(const Comm::ConnectionPointer &, char *buf, size_t, Comm::Flag, int, void *)
 {
     xfree(buf);
 }
index 4d8ef60a48ecf6aedcbf974e090b069198f3be15..8d55d6d0fed7b27abe443e0954e91efeb36dfa9d 100644 (file)
@@ -480,7 +480,7 @@ munge_menu_line(const char *buf, cachemgr_request * req)
 }
 
 static const char *
-munge_other_line(const char *buf, cachemgr_request * req)
+munge_other_line(const char *buf, cachemgr_request *)
 {
     static const char *ttags[] = {"td", "th"};
 
index 1ab37a5835023abffb2fb7d4f01d86f4834718ad..cbd56d662711f7aed26c76860b25f5e8e9218faf 100644 (file)
@@ -104,7 +104,7 @@ getSocketNoDelay( int sockfd )
 }
 
 int
-setSocketNoDelay( int sockfd, bool nodelay )
+setSocketNoDelay( int sockfd, bool)
 // purpose: get state of the TCP_NODELAY of the socket
 // paramtr: sockfd (IN): socket descriptor
 //          nodelay (IN): true, if TCP_NODELAY is to be set, false otherwise.
index 66f506fab9281c63461b3e3df7918e3fc3502dab..d2c49afdaf4a5b798c7650f3cdf70d484594e8ff 100644 (file)
@@ -574,7 +574,7 @@ main(int argc, char *argv[])
 }
 
 void
-pipe_handler(int sig)
+pipe_handler(int)
 {
     std::cerr << "SIGPIPE received." << std::endl;
 }