[PATCH] [CLEANUP] Remove assigned but unused variables

From: Simon Horman <horms#verge.net.au>
Date: Tue, 7 Jun 2011 11:07:50 +0900

---

gcc (Debian 4.6.0-2) 4.6.1 20110329 (prerelease)
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

...
src/proto_http.c:3029:14: warning: variable ‘del_cl’ set but not used [-Wunused-but-set-variable]
In file included from ebtree/eb64tree.c:23:0:
ebtree/eb64tree.h: In function ‘__eb64_lookup’:
ebtree/eb64tree.h:128:6: warning: variable ‘node_bit’ set but not used [-Wunused-but-set-variable]
ebtree/eb64tree.h: In function ‘__eb64i_lookup’:
ebtree/eb64tree.h:180:6: warning: variable ‘node_bit’ set but not used [-Wunused-but-set-variable]
In file included from ebtree/ebpttree.h:26:0,
                 from ebtree/ebimtree.c:23:
ebtree/eb64tree.h: In function ‘__eb64_lookup’:
ebtree/eb64tree.h:128:6: warning: variable ‘node_bit’ set but not used [-Wunused-but-set-variable]
ebtree/eb64tree.h: In function ‘__eb64i_lookup’:
ebtree/eb64tree.h:180:6: warning: variable ‘node_bit’ set but not used [-Wunused-but-set-variable]
In file included from ebtree/ebpttree.h:26:0,
                 from ebtree/ebistree.h:25,
                 from ebtree/ebistree.c:23:
ebtree/eb64tree.h: In function ‘__eb64_lookup’:
ebtree/eb64tree.h:128:6: warning: variable ‘node_bit’ set but not used [-Wunused-but-set-variable]
ebtree/eb64tree.h: In function ‘__eb64i_lookup’:
ebtree/eb64tree.h:180:6: warning: variable ‘node_bit’ set but not used [-Wunused-but-set-variable]
---
 ebtree/eb64tree.h |    4 ----
 src/proto_http.c  |    4 +---
 2 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/ebtree/eb64tree.h b/ebtree/eb64tree.h
index d756e7a..b31014b 100644
--- a/ebtree/eb64tree.h
+++ b/ebtree/eb64tree.h

@@ -125,7 +125,6 @@ static forceinline struct eb64_node *__eb64_lookup(struct eb_root *root, u64 x)
struct eb64_node *node; eb_troot_t *troot; u64 y; - int node_bit; troot = root->b[EB_LEFT]; if (unlikely(troot == NULL))
@@ -142,7 +141,6 @@ static forceinline struct eb64_node *__eb64_lookup(struct eb_root *root, u64 x)
} node = container_of(eb_untag(troot, EB_NODE), struct eb64_node, node.branches); - node_bit = node->node.bit; y = node->key ^ x; if (!y) {
@@ -177,7 +175,6 @@ static forceinline struct eb64_node *__eb64i_lookup(struct eb_root *root, s64 x)
eb_troot_t *troot; u64 key = x ^ (1ULL << 63); u64 y; - int node_bit; troot = root->b[EB_LEFT]; if (unlikely(troot == NULL))
@@ -194,7 +191,6 @@ static forceinline struct eb64_node *__eb64i_lookup(struct eb_root *root, s64 x)
} node = container_of(eb_untag(troot, EB_NODE), struct eb64_node, node.branches); - node_bit = node->node.bit; y = node->key ^ x; if (!y) { diff --git a/src/proto_http.c b/src/proto_http.c index 69232f9..39b7f28 100644 --- a/src/proto_http.c +++ b/src/proto_http.c
@@ -3026,7 +3026,7 @@ int http_process_req_common(struct session *s, struct buffer *req, int an_bit, s
struct http_req_rule *http_req_last_rule = NULL; struct redirect_rule *rule; struct cond_wordlist *wl; - int del_ka, del_cl, do_stats; + int do_stats; if (unlikely(msg->msg_state < HTTP_MSG_BODY)) { /* we need more data */
@@ -3138,8 +3138,6 @@ int http_process_req_common(struct session *s, struct buffer *req, int an_bit, s
* are there for the first time. */ - del_cl = del_ka = 0; - if ((!(txn->flags & TX_HDR_CONN_PRS) && (s->fe->options & (PR_O_KEEPALIVE|PR_O_SERVER_CLO|PR_O_HTTP_CLOSE|PR_O_FORCE_CLO))) || ((s->fe->options & (PR_O_KEEPALIVE|PR_O_SERVER_CLO|PR_O_HTTP_CLOSE|PR_O_FORCE_CLO)) != -- 1.7.4.4
Received on 2011/06/07 04:07

This archive was generated by hypermail 2.2.0 : 2011/06/07 04:15 CEST