aboutsummaryrefslogtreecommitdiff
path: root/src/or/channeltls.c
diff options
context:
space:
mode:
authorteor <teor2345@gmail.com>2014-10-26 14:43:55 +1100
committerteor <teor2345@gmail.com>2014-10-30 22:34:46 +1100
commit13298d90a90dc62d21d38f910171c9b57a8f0273 (patch)
treedf91745009bef0a26901438d361036f039e9b00f /src/or/channeltls.c
parentacc392856d255059949bb22d2daf56c61f3fd76d (diff)
downloadtor-13298d90a90dc62d21d38f910171c9b57a8f0273.tar.gz
tor-13298d90a90dc62d21d38f910171c9b57a8f0273.zip
Silence spurious clang warnings
Silence clang warnings under --enable-expensive-hardening, including: + implicit truncation of 64 bit values to 32 bit; + const char assignment to self; + tautological compare; and + additional parentheses around equality tests. (gcc uses these to silence assignment, so clang warns when they're present in an equality test. But we need to use extra parentheses in macros to isolate them from other code).
Diffstat (limited to 'src/or/channeltls.c')
-rw-r--r--src/or/channeltls.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/channeltls.c b/src/or/channeltls.c
index f5f345b3e5..db044aee56 100644
--- a/src/or/channeltls.c
+++ b/src/or/channeltls.c
@@ -847,8 +847,8 @@ channel_tls_handle_state_change_on_orconn(channel_tls_t *chan,
tor_assert(conn);
tor_assert(conn->chan == chan);
tor_assert(chan->conn == conn);
- /* -Werror appeasement */
- tor_assert(old_state == old_state);
+ /* Shut the compiler up without triggering -Wtautological-compare */
+ (void)old_state;
base_chan = TLS_CHAN_TO_BASE(chan);