File 12714.patch of Package squid
---------------------
PatchSet 12714
Date: 2011/08/26 22:01:25
Author: hno
Branch: SQUID_2_7
Tag: (none)
Log:
Fix various harmless warnings detected by gcc 4.6
Members:
helpers/external_acl/ldap_group/squid_ldap_group.c:1.14.6.5->1.14.6.6
helpers/ntlm_auth/fakeauth/fakeauth_auth.c:1.12->1.12.2.1
src/authenticate.c:1.51.6.2->1.51.6.3
src/client_side.c:1.754.2.30->1.754.2.31
src/forward.c:1.131.2.5->1.131.2.6
src/fqdncache.c:1.158->1.158.2.1
src/neighbors.c:1.319.2.8->1.319.2.9
src/auth/negotiate/auth_negotiate.c:1.12.2.1->1.12.2.2
src/auth/ntlm/auth_ntlm.c:1.42->1.42.2.1
Index: squid/helpers/external_acl/ldap_group/squid_ldap_group.c
===================================================================
RCS file: /cvsroot/squid/squid/helpers/external_acl/ldap_group/squid_ldap_group.c,v
retrieving revision 1.14.6.5
retrieving revision 1.14.6.6
diff -u -r1.14.6.5 -r1.14.6.6
--- squid/helpers/external_acl/ldap_group/squid_ldap_group.c 16 Sep 2009 20:56:32 -0000 1.14.6.5
+++ squid/helpers/external_acl/ldap_group/squid_ldap_group.c 26 Aug 2011 22:01:25 -0000 1.14.6.6
@@ -218,7 +218,6 @@
int use_extension_dn = 0;
int strip_nt_domain = 0;
int strip_kerberos_realm = 0;
- int err = 0;
setbuf(stdout, NULL);
@@ -599,7 +598,6 @@
tryagain = 1;
}
}
- err = 0;
}
if (ld)
ldap_unbind(ld);
Index: squid/helpers/ntlm_auth/fakeauth/fakeauth_auth.c
===================================================================
RCS file: /cvsroot/squid/squid/helpers/ntlm_auth/fakeauth/fakeauth_auth.c,v
retrieving revision 1.12
retrieving revision 1.12.2.1
diff -u -r1.12 -r1.12.2.1
--- squid/helpers/ntlm_auth/fakeauth/fakeauth_auth.c 1 Apr 2007 14:17:46 -0000 1.12
+++ squid/helpers/ntlm_auth/fakeauth/fakeauth_auth.c 26 Aug 2011 22:01:25 -0000 1.12.2.1
@@ -145,7 +145,6 @@
{
static unsigned hash;
int r;
- char *d;
int i;
debug("ntlmMakeChallenge: flg %08x\n", flags);
@@ -161,7 +160,6 @@
chal->hdr.type = WSWAP(NTLM_CHALLENGE);
chal->unknown[6] = SSWAP(0x003a);
- d = (char *) chal + 48;
i = 0;
if (authenticate_ntlm_domain != NULL)
Index: squid/src/authenticate.c
===================================================================
RCS file: /cvsroot/squid/squid/src/authenticate.c,v
retrieving revision 1.51.6.2
retrieving revision 1.51.6.3
diff -u -r1.51.6.2 -r1.51.6.3
--- squid/src/authenticate.c 4 May 2008 23:23:13 -0000 1.51.6.2
+++ squid/src/authenticate.c 26 Aug 2011 22:01:26 -0000 1.51.6.3
@@ -1,6 +1,6 @@
/*
- * $Id: authenticate.c,v 1.51.6.2 2008/05/04 23:23:13 hno Exp $
+ * $Id: authenticate.c,v 1.51.6.3 2011/08/26 22:01:26 hno Exp $
*
* DEBUG: section 29 Authenticator
* AUTHOR: Duane Wessels
@@ -333,7 +333,6 @@
{
time_t delta = Config.authenticateIpShortcircuitTTL;
auth_user_request_ip_hash_t *hash_entry;
- auth_user_request_t *auth_user_request = NULL;
if (!auth_user_request_ip_hash)
return NULL;
@@ -342,7 +341,6 @@
if (!hash_entry)
return NULL;
- auth_user_request = hash_entry->auth_user_request;
if (hash_entry->last_seen + delta < squid_curtime) {
authenticateAuthUserRequestUnlinkIp(ipaddr);
return NULL;
Index: squid/src/client_side.c
===================================================================
RCS file: /cvsroot/squid/squid/src/client_side.c,v
retrieving revision 1.754.2.30
retrieving revision 1.754.2.31
diff -u -r1.754.2.30 -r1.754.2.31
--- squid/src/client_side.c 13 Jul 2010 19:43:08 -0000 1.754.2.30
+++ squid/src/client_side.c 26 Aug 2011 22:01:26 -0000 1.754.2.31
@@ -1,6 +1,6 @@
/*
- * $Id: client_side.c,v 1.754.2.30 2010/07/13 19:43:08 hno Exp $
+ * $Id: client_side.c,v 1.754.2.31 2011/08/26 22:01:26 hno Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
@@ -3675,7 +3675,6 @@
char *url = urlbuf;
const char *req_hdr = NULL;
http_version_t http_ver;
- size_t header_sz; /* size of headers, not including first line */
size_t prefix_sz; /* size of whole request (req-line + headers) */
size_t req_sz;
method_t method;
@@ -3742,7 +3741,6 @@
*/
/* XXX re-evaluate all of these values and use whats in hmsg instead! */
req_hdr = hmsg->buf + hmsg->r_len;
- header_sz = hmsg->h_len;
debug(33, 3) ("parseHttpRequest: req_hdr = {%s}\n", req_hdr);
prefix_sz = req_sz;
Index: squid/src/forward.c
===================================================================
RCS file: /cvsroot/squid/squid/src/forward.c,v
retrieving revision 1.131.2.5
retrieving revision 1.131.2.6
diff -u -r1.131.2.5 -r1.131.2.6
--- squid/src/forward.c 18 Jul 2008 00:47:48 -0000 1.131.2.5
+++ squid/src/forward.c 26 Aug 2011 22:01:26 -0000 1.131.2.6
@@ -1,6 +1,6 @@
/*
- * $Id: forward.c,v 1.131.2.5 2008/07/18 00:47:48 hno Exp $
+ * $Id: forward.c,v 1.131.2.6 2011/08/26 22:01:26 hno Exp $
*
* DEBUG: section 17 Request Forwarding
* AUTHOR: Duane Wessels
@@ -59,7 +59,6 @@
static void fwdLogReplyStatus(int tries, http_status status);
static OBJH fwdStats;
static STABH fwdAbort;
-static peer *fwdStateServerPeer(FwdState *);
#define MAX_FWD_STATS_IDX 9
static int FwdReplyCodes[MAX_FWD_STATS_IDX + 1][HTTP_INVALID_HEADER + 1];
@@ -69,16 +68,6 @@
static Logfile *logfile = NULL;
#endif
-static peer *
-fwdStateServerPeer(FwdState * fwdState)
-{
- if (NULL == fwdState)
- return NULL;
- if (NULL == fwdState->servers)
- return NULL;
- return fwdState->servers->peer;
-}
-
static void
fwdServerFree(FwdServer * fs)
{
@@ -92,7 +81,6 @@
{
StoreEntry *e = fwdState->entry;
int sfd;
- peer *p;
debug(17, 3) ("fwdStateFree: %p\n", fwdState);
assert(e->mem_obj);
#if URL_CHECKSUM_DEBUG
@@ -109,7 +97,6 @@
storeResetDefer(e);
if (storePendingNClients(e) > 0)
assert(!EBIT_TEST(e->flags, ENTRY_FWD_HDR_WAIT));
- p = fwdStateServerPeer(fwdState);
fwdServersFree(&fwdState->servers);
requestUnlink(fwdState->request);
fwdState->request = NULL;
Index: squid/src/fqdncache.c
===================================================================
RCS file: /cvsroot/squid/squid/src/fqdncache.c,v
retrieving revision 1.158
retrieving revision 1.158.2.1
diff -u -r1.158 -r1.158.2.1
--- squid/src/fqdncache.c 13 Oct 2007 00:01:38 -0000 1.158
+++ squid/src/fqdncache.c 26 Aug 2011 22:01:27 -0000 1.158.2.1
@@ -1,6 +1,6 @@
/*
- * $Id: fqdncache.c,v 1.158 2007/10/13 00:01:38 hno Exp $
+ * $Id: fqdncache.c,v 1.158.2.1 2011/08/26 22:01:27 hno Exp $
*
* DEBUG: section 35 FQDN Cache
* AUTHOR: Harvest Derived
@@ -333,12 +333,11 @@
fqdncacheHandleReply(void *data, rfc1035_rr * answers, int na, const char *error_message)
#endif
{
- int n;
generic_cbdata *c = data;
fqdncache_entry *f = c->data;
cbdataFree(c);
c = NULL;
- n = ++FqdncacheStats.replies;
+ FqdncacheStats.replies += 1;
statHistCount(&statCounter.dns.svc_time,
tvSubMsec(f->request_time, current_time));
#if USE_DNSSERVERS
Index: squid/src/neighbors.c
===================================================================
RCS file: /cvsroot/squid/squid/src/neighbors.c,v
retrieving revision 1.319.2.8
retrieving revision 1.319.2.9
diff -u -r1.319.2.8 -r1.319.2.9
--- squid/src/neighbors.c 27 Jun 2008 21:52:56 -0000 1.319.2.8
+++ squid/src/neighbors.c 26 Aug 2011 22:01:27 -0000 1.319.2.9
@@ -1,6 +1,6 @@
/*
- * $Id: neighbors.c,v 1.319.2.8 2008/06/27 21:52:56 hno Exp $
+ * $Id: neighbors.c,v 1.319.2.9 2011/08/26 22:01:27 hno Exp $
*
* DEBUG: section 15 Neighbor Routines
* AUTHOR: Harvest Derived
@@ -642,7 +642,6 @@
{
peer *best_p = NULL;
#if USE_CACHE_DIGESTS
- const cache_key *key;
int best_rtt = 0;
int choice_count = 0;
int ichoice_count = 0;
@@ -651,7 +650,6 @@
int i;
if (!request->flags.hierarchical)
return NULL;
- key = storeKeyPublicByRequest(request);
for (i = 0, p = first_ping; i++ < Config.npeers; p = p->next) {
lookup_t lookup;
if (!p)
Index: squid/src/auth/negotiate/auth_negotiate.c
===================================================================
RCS file: /cvsroot/squid/squid/src/auth/negotiate/auth_negotiate.c,v
retrieving revision 1.12.2.1
retrieving revision 1.12.2.2
diff -u -r1.12.2.1 -r1.12.2.2
--- squid/src/auth/negotiate/auth_negotiate.c 28 Sep 2008 22:44:36 -0000 1.12.2.1
+++ squid/src/auth/negotiate/auth_negotiate.c 26 Aug 2011 22:01:27 -0000 1.12.2.2
@@ -1,6 +1,6 @@
/*
- * $Id: auth_negotiate.c,v 1.12.2.1 2008/09/28 22:44:36 hno Exp $
+ * $Id: auth_negotiate.c,v 1.12.2.2 2011/08/26 22:01:27 hno Exp $
*
* DEBUG: section 29 Negotiate Authenticator
* AUTHOR: Robert Collins
@@ -701,14 +701,12 @@
const char *proxy_auth, *blob;
auth_user_t *auth_user;
negotiate_request_t *negotiate_request;
- negotiate_user_t *negotiate_user;
auth_user = auth_user_request->auth_user;
assert(auth_user);
assert(auth_user->auth_type == AUTH_NEGOTIATE);
assert(auth_user->scheme_data != NULL);
assert(auth_user_request->scheme_data != NULL);
- negotiate_user = auth_user->scheme_data;
negotiate_request = auth_user_request->scheme_data;
/* Check that we are in the client side, where we can generate
* auth challenges */
Index: squid/src/auth/ntlm/auth_ntlm.c
===================================================================
RCS file: /cvsroot/squid/squid/src/auth/ntlm/auth_ntlm.c,v
retrieving revision 1.42
retrieving revision 1.42.2.1
diff -u -r1.42 -r1.42.2.1
--- squid/src/auth/ntlm/auth_ntlm.c 28 Aug 2007 22:39:10 -0000 1.42
+++ squid/src/auth/ntlm/auth_ntlm.c 26 Aug 2011 22:01:28 -0000 1.42.2.1
@@ -1,6 +1,6 @@
/*
- * $Id: auth_ntlm.c,v 1.42 2007/08/28 22:39:10 hno Exp $
+ * $Id: auth_ntlm.c,v 1.42.2.1 2011/08/26 22:01:28 hno Exp $
*
* DEBUG: section 29 NTLM Authenticator
* AUTHOR: Robert Collins
@@ -657,14 +657,12 @@
const char *proxy_auth, *blob;
auth_user_t *auth_user;
ntlm_request_t *ntlm_request;
- ntlm_user_t *ntlm_user;
auth_user = auth_user_request->auth_user;
assert(auth_user);
assert(auth_user->auth_type == AUTH_NTLM);
assert(auth_user->scheme_data != NULL);
assert(auth_user_request->scheme_data != NULL);
- ntlm_user = auth_user->scheme_data;
ntlm_request = auth_user_request->scheme_data;
/* Check that we are in the client side, where we can generate
* auth challenges */