]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix GCC v4.6.1 "variable set but not used" warnings.
authorDmitry Kurochkin <dmitry.kurochkin@measurement-factory.com>
Wed, 29 Jun 2011 03:58:58 +0000 (07:58 +0400)
committerDmitry Kurochkin <dmitry.kurochkin@measurement-factory.com>
Wed, 29 Jun 2011 03:58:58 +0000 (07:58 +0400)
helpers/external_acl/LDAP_group/ext_ldap_group_acl.cc
src/DiskIO/AIO/AIODiskIOStrategy.cc
src/client_side_reply.cc
src/dns_internal.cc
src/errorpage.cc
src/fqdncache.cc
src/ftp.cc

index f8b2ea14b5802ea0ca944a4a9f2c7b476dd407cf..c843d07390807b0c356c6dfc2436a004c8ee8ea4 100644 (file)
@@ -230,7 +230,6 @@ main(int argc, char **argv)
     int use_extension_dn = 0;
     int strip_nt_domain = 0;
     int strip_kerberos_realm = 0;
-    int err = 0;
 
     setbuf(stdout, NULL);
 
@@ -613,7 +612,6 @@ recover:
                 tryagain = 1;
             }
         }
-        err = 0;
     }
     if (ld)
         ldap_unbind(ld);
index 61f79921ad37e94ce33df54b43402247c6f272f0..96e11f4cb985c2ebb157584997c903d6a63bd043 100644 (file)
@@ -123,7 +123,6 @@ AIODiskIOStrategy::callback()
     void *cbdata;
     int callback_valid;
     void *buf;
-    int filedescriptor;
     async_queue_entry_t *aqe;
     async_queue_entry_type_t type;
 
@@ -148,7 +147,6 @@ AIODiskIOStrategy::callback()
                 /* Get the callback parameters */
                 freefunc = aqe->aq_e_free;
                 buf = aqe->aq_e_buf;
-                filedescriptor = aqe->aq_e_fd;
                 type = aqe->aq_e_type;
                 callback_valid = cbdataReferenceValidDone(aqe->aq_e_callback_data, &cbdata);
                 AIODiskFile * theFile = NULL;
index 847cdb9e41fd2312d32c50b184d352ae55bf31f2..69aa83b91c100388c9cbe0d0de6060f11e198f80 100644 (file)
@@ -1071,14 +1071,6 @@ clientReplyContext::storeNotOKTransferDone() const
         /* haven't found end of headers yet */
         return 0;
 
-    int sending = SENDING_BODY;
-
-    if (curReply->sline.status == HTTP_NO_CONTENT ||
-            curReply->sline.status == HTTP_NOT_MODIFIED ||
-            curReply->sline.status < HTTP_OK ||
-            http->request->method == METHOD_HEAD)
-        sending = SENDING_HDRSONLY;
-
     /*
      * Figure out how much data we are supposed to send.
      * If we are sending a body and we don't have a content-length,
@@ -2061,13 +2053,10 @@ clientReplyContext::sendMoreData (StoreIOBuffer result)
 
     char *buf = next()->readBuffer.data;
 
-    char *body_buf = buf;
-
     if (buf != result.data) {
         /* we've got to copy some data */
         assert(result.length <= next()->readBuffer.length);
         memcpy(buf, result.data, result.length);
-        body_buf = buf;
     }
 
     if (reqofs==0 && !logTypeIsATcpHit(http->logType)) {
index 6d8a67474fe01a621e64d814a0c646c4baa1c12a..6fdcca011282b58487d9cc6c6f768e98ee0f62e4 100644 (file)
@@ -1477,8 +1477,6 @@ idnsInit(void)
     CBDATA_INIT_TYPE(idns_query);
 
     if (DnsSocketA < 0 && DnsSocketB < 0) {
-        int port;
-
         Ip::Address addrA; // since we don't want to alter Config.Addrs.udp_* and dont have one of our own.
 
         if (!Config.Addrs.udp_outgoing.IsNoAddr())
@@ -1514,12 +1512,10 @@ idnsInit(void)
          * statement. Doing so messes up the internal Debug::level
          */
         if (DnsSocketB >= 0) {
-            port = comm_local_port(DnsSocketB);
             debugs(78, 1, "DNS Socket created at " << addrB << ", FD " << DnsSocketB);
             Comm::SetSelect(DnsSocketB, COMM_SELECT_READ, idnsRead, NULL, 0);
         }
         if (DnsSocketA >= 0) {
-            port = comm_local_port(DnsSocketA);
             debugs(78, 1, "DNS Socket created at " << addrA << ", FD " << DnsSocketA);
             Comm::SetSelect(DnsSocketA, COMM_SELECT_READ, idnsRead, NULL, 0);
         }
index 1b266a4295f18aff7962f61994d2f2687401bd2f..db7ecc342b9ace912877fc63e143675f41d48e40 100644 (file)
@@ -568,7 +568,6 @@ int
 ErrorState::Dump(MemBuf * mb)
 {
     MemBuf str;
-    const char *p = NULL;      /* takes priority over mb if set */
     char ntoabuf[MAX_IPSTRLEN];
 
     str.reset();
@@ -623,10 +622,6 @@ ErrorState::Dump(MemBuf * mb)
         packerToMemInit(&pck, &str);
         request->header.packInto(&pck);
         packerClean(&pck);
-    } else if (request_hdrs) {
-        p = request_hdrs;
-    } else {
-        p = "[none]";
     }
 
     str.Printf("\r\n");
index ef75be1622bd839f8c5e86f0939075b00a8cac28..4f474204bf6e207ede1e216d772e496569b2dda5 100644 (file)
@@ -496,10 +496,9 @@ fqdncacheHandleReply(void *data, char *reply)
 fqdncacheHandleReply(void *data, rfc1035_rr * answers, int na, const char *error_message)
 #endif
 {
-    int n;
     fqdncache_entry *f;
     static_cast<generic_cbdata *>(data)->unwrap(&f);
-    n = ++FqdncacheStats.replies;
+    ++FqdncacheStats.replies;
     const int age = f->age();
     statHistCount(&statCounter.dns.svc_time, age);
 #if USE_DNSSERVERS
index 5858e024d3a161ea79c03a9d9c6888c54f663a2e..2b9fb757e7e5782b48e518af8a37b3ff8db52210 100644 (file)
@@ -2368,7 +2368,6 @@ ftpReadEPSV(FtpStateData* ftpState)
 {
     int code = ftpState->ctrl.replycode;
     char h1, h2, h3, h4;
-    int n;
     u_short port;
     Ip::Address ipa_remote;
     int fd = ftpState->data.fd;
@@ -2436,7 +2435,7 @@ ftpReadEPSV(FtpStateData* ftpState)
 
     buf = ftpState->ctrl.last_reply + strcspn(ftpState->ctrl.last_reply, "(");
 
-    n = sscanf(buf, "(%c%c%c%hu%c)", &h1, &h2, &h3, &port, &h4);
+    sscanf(buf, "(%c%c%c%hu%c)", &h1, &h2, &h3, &port, &h4);
 
     if (h1 != h2 || h1 != h3 || h1 != h4) {
         debugs(9, DBG_IMPORTANT, "Invalid EPSV reply from " <<