[tor-commits] [tor/master] Use a cast to try to avoid a tautalogical comparison warning

nickm at torproject.org nickm at torproject.org
Thu Apr 27 15:59:57 UTC 2017


commit 480dab4f2f8de6661c71e71f37d4a824ecf38e3c
Author: Nick Mathewson <nickm at torproject.org>
Date:   Thu Apr 27 11:58:26 2017 -0400

    Use a cast to try to avoid a tautalogical comparison warning
---
 src/or/directory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/or/directory.c b/src/or/directory.c
index e53bc78..2b9f18a 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -2942,7 +2942,7 @@ parse_accept_encoding_header(const char *h)
   SMARTLIST_FOREACH_BEGIN(methods, const char *, m) {
     compress_method_t method = compression_method_get_by_name(m);
     if (method != UNKNOWN_METHOD) {
-      tor_assert(method < 8*sizeof(unsigned));
+      tor_assert(((unsigned)method) < 8*sizeof(unsigned));
       result |= (1u << method);
     }
   } SMARTLIST_FOREACH_END(m);



More information about the tor-commits mailing list