mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
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.
This commit is contained in:
parent
cf994f7ad7
commit
bd28322d38
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user