diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-10-16 13:59:34 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-10-16 13:59:34 +0000 |
commit | 427eb4649b802971719542e52776c8973aa7a60a (patch) | |
tree | 8cb00c791535cff1b631fbf3010987bda8d33ebf | |
parent | a58ba03b85b6d8a8c9d87026e04733bec82ed5ff (diff) | |
download | tor-427eb4649b802971719542e52776c8973aa7a60a.tar.gz tor-427eb4649b802971719542e52776c8973aa7a60a.zip |
r15842@catbus: nickm | 2007-10-16 09:58:33 -0400
Backport warning-suppression for gcc 4.2.
svn:r11981
-rw-r--r-- | src/or/circuitlist.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c index 1d5e77171d..47e6d6a25a 100644 --- a/src/or/circuitlist.c +++ b/src/or/circuitlist.c @@ -1056,10 +1056,15 @@ assert_circuit_ok(const circuit_t *c) tor_assert(c->purpose >= _CIRCUIT_PURPOSE_MIN && c->purpose <= _CIRCUIT_PURPOSE_MAX); - if (CIRCUIT_IS_ORIGIN(c)) - origin_circ = TO_ORIGIN_CIRCUIT((circuit_t*)c); - else - or_circ = TO_OR_CIRCUIT((circuit_t*)c); + { + /* Having a separate variable for this pleases GCC 4.2 in ways I hope I + * never understand. -NM. */ + circuit_t *nonconst_circ = (circuit_t*) c; + if (CIRCUIT_IS_ORIGIN(c)) + origin_circ = TO_ORIGIN_CIRCUIT(nonconst_circ); + else + or_circ = TO_OR_CIRCUIT(nonconst_circ); + } if (c->n_conn) { tor_assert(!memcmp(c->n_conn->identity_digest, c->n_conn_id_digest, |