[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Remove variables; fix gcc 4.7 warnings
commit bd28322d3815a03ca04beb6d00052d613dbe226f
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Wed Oct 10 21:25:52 2012 -0400
Remove variables; fix gcc 4.7 warnings
My GCC warns when variables are assigned to but never used. There
were a few like that in the 6816/6465 branches.
---
src/or/channel.c | 3 +--
src/or/channeltls.c | 3 ---
src/or/circuitlist.c | 4 +---
src/or/circuitmux_ewma.c | 5 -----
4 files changed, 2 insertions(+), 13 deletions(-)
diff --git a/src/or/channel.c b/src/or/channel.c
index 570bb37..b52db40 100644
--- a/src/or/channel.c
+++ b/src/or/channel.c
@@ -552,7 +552,7 @@ channel_add_to_digest_map(channel_t *chan)
static void
channel_remove_from_digest_map(channel_t *chan)
{
- channel_t *tmp, *head;
+ channel_t *tmp;
tor_assert(chan);
@@ -588,7 +588,6 @@ channel_remove_from_digest_map(channel_t *chan)
tmp = digestmap_get(channel_identity_map, chan->identity_digest);
if (tmp) {
/* Okay, it's here */
- head = tmp; /* Keep track of list head */
/* Look for this channel */
while (tmp && tmp != chan) {
tmp = tmp->next_with_same_id;
diff --git a/src/or/channeltls.c b/src/or/channeltls.c
index 764de80..1a2956b 100644
--- a/src/or/channeltls.c
+++ b/src/or/channeltls.c
@@ -917,7 +917,6 @@ void
channel_tls_handle_var_cell(var_cell_t *var_cell, or_connection_t *conn)
{
channel_tls_t *chan;
- int handshaking;
#ifdef KEEP_TIMING_STATS
/* how many of each cell have we seen so far this second? needs better
@@ -953,8 +952,6 @@ channel_tls_handle_var_cell(var_cell_t *var_cell, or_connection_t *conn)
return;
}
- handshaking = (TO_CONN(conn)->state != OR_CONN_STATE_OPEN);
-
if (TO_CONN(conn)->marked_for_close)
return;
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c
index 5140600..b738226 100644
--- a/src/or/circuitlist.c
+++ b/src/or/circuitlist.c
@@ -100,18 +100,16 @@ circuit_set_circid_chan_helper(circuit_t *circ, int direction,
chan_circid_circuit_map_t *found;
channel_t *old_chan, **chan_ptr;
circid_t old_id, *circid_ptr;
- int was_active, make_active, attached = 0;
+ int make_active, attached = 0;
if (direction == CELL_DIRECTION_OUT) {
chan_ptr = &circ->n_chan;
circid_ptr = &circ->n_circ_id;
- was_active = circ->next_active_on_n_chan != NULL;
make_active = circ->n_chan_cells.n > 0;
} else {
or_circuit_t *c = TO_OR_CIRCUIT(circ);
chan_ptr = &c->p_chan;
circid_ptr = &c->p_circ_id;
- was_active = c->next_active_on_p_chan != NULL;
make_active = c->p_chan_cells.n > 0;
}
old_chan = *chan_ptr;
diff --git a/src/or/circuitmux_ewma.c b/src/or/circuitmux_ewma.c
index 82ad5c7..c280bf4 100644
--- a/src/or/circuitmux_ewma.c
+++ b/src/or/circuitmux_ewma.c
@@ -265,7 +265,6 @@ ewma_alloc_circ_data(circuitmux_t *cmux,
cell_direction_t direction,
unsigned int cell_count)
{
- ewma_policy_data_t *pol = NULL;
ewma_policy_circ_data_t *cdata = NULL;
tor_assert(cmux);
@@ -276,8 +275,6 @@ ewma_alloc_circ_data(circuitmux_t *cmux,
/* Shut the compiler up */
tor_assert(cell_count == cell_count);
- pol = TO_EWMA_POL_DATA(pol_data);
-
cdata = tor_malloc_zero(sizeof(*cdata));
cdata->_base.magic = EWMA_POL_CIRC_DATA_MAGIC;
cdata->circ = circ;
@@ -309,13 +306,11 @@ ewma_free_circ_data(circuitmux_t *cmux,
circuitmux_policy_circ_data_t *pol_circ_data)
{
- ewma_policy_data_t *pol = NULL;
ewma_policy_circ_data_t *cdata = NULL;
tor_assert(cmux);
tor_assert(circ);
tor_assert(pol_data);
- pol = TO_EWMA_POL_DATA(pol_data);
if (!pol_circ_data) return;
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits