From a5232e0c4c572cdff85701f698b8b90c9443d7e4 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 23 May 2011 17:04:38 -0400 Subject: 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. --- src/or/control.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/or/control.c') diff --git a/src/or/control.c b/src/or/control.c index 0dad1b9dfa..f75ac67758 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -3142,7 +3142,6 @@ control_event_circuit_status(origin_circuit_t *circ, circuit_status_event_t tp, { const char *status; char extended_buf[96]; - int providing_reason=0; if (!EVENT_IS_INTERESTING(EVENT_CIRCUIT_STATUS)) return 0; tor_assert(circ); @@ -3166,7 +3165,6 @@ control_event_circuit_status(origin_circuit_t *circ, circuit_status_event_t tp, const char *reason_str = circuit_end_reason_to_control_string(reason_code); char *reason = NULL; size_t n=strlen(extended_buf); - providing_reason=1; if (!reason_str) { reason = tor_malloc(16); tor_snprintf(reason, 16, "UNKNOWN_%d", reason_code); -- cgit v1.2.3-54-g00ecf