diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-05-23 17:04:38 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-05-23 17:04:38 -0400 |
commit | a5232e0c4c572cdff85701f698b8b90c9443d7e4 (patch) | |
tree | 1bc0db8feaa3a808518b5c277481eefacb984277 /src/or/dirvote.c | |
parent | 57810c333a38c72c1e361c02e31de7712d1f221a (diff) | |
download | tor-a5232e0c4c572cdff85701f698b8b90c9443d7e4.tar.gz tor-a5232e0c4c572cdff85701f698b8b90c9443d7e4.zip |
Fix GCC 4.6's new -Wunused-but-set-variable warnings.
Most instances were dead code; for those, I removed the assignments.
Some were pieces of info we don't currently plan to use, but which
we might in the future. For those, I added an explicit cast-to-void
to indicate that we know that the thing's unused. Finally, one was
a case where we were testing the wrong variable in a unit test.
That one I fixed.
This resolves bug 3208.
Diffstat (limited to 'src/or/dirvote.c')
-rw-r--r-- | src/or/dirvote.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c index 96e3df5cec..c6ce9f6776 100644 --- a/src/or/dirvote.c +++ b/src/or/dirvote.c @@ -1592,7 +1592,7 @@ networkstatus_compute_consensus(smartlist_t *votes, * is the same flag as votes[j]->known_flags[b]. */ int *named_flag; /* Index of the flag "Named" for votes[j] */ int *unnamed_flag; /* Index of the flag "Unnamed" for votes[j] */ - int chosen_named_idx, chosen_unnamed_idx; + int chosen_named_idx; strmap_t *name_to_id_map = strmap_new(); char conflict[DIGEST_LEN]; @@ -1610,7 +1610,6 @@ networkstatus_compute_consensus(smartlist_t *votes, for (i = 0; i < smartlist_len(votes); ++i) unnamed_flag[i] = named_flag[i] = -1; chosen_named_idx = smartlist_string_pos(flags, "Named"); - chosen_unnamed_idx = smartlist_string_pos(flags, "Unnamed"); /* Build the flag index. */ SMARTLIST_FOREACH(votes, networkstatus_t *, v, |