diff options
author | teor <teor2345@gmail.com> | 2014-10-26 14:43:55 +1100 |
---|---|---|
committer | teor <teor2345@gmail.com> | 2014-10-30 22:34:46 +1100 |
commit | 13298d90a90dc62d21d38f910171c9b57a8f0273 (patch) | |
tree | df91745009bef0a26901438d361036f039e9b00f /src/ext/ht.h | |
parent | acc392856d255059949bb22d2daf56c61f3fd76d (diff) | |
download | tor-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/ext/ht.h')
-rw-r--r-- | src/ext/ht.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ext/ht.h b/src/ext/ht.h index 1cca28ef4d..09f5dcccd5 100644 --- a/src/ext/ht.h +++ b/src/ext/ht.h @@ -38,8 +38,9 @@ } #endif +/* || 0 is for -Wparentheses-equality (-Wall?) appeasement under clang */ #define HT_EMPTY(head) \ - ((head)->hth_n_entries == 0) + (((head)->hth_n_entries == 0) || 0) /* How many elements in 'head'? */ #define HT_SIZE(head) \ |