[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] 32-bit compilation warnings



commit 4b58b97c689e672d9f1e9f8c4ff606f02c577917
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Fri Apr 13 17:00:51 2018 -0400

    32-bit compilation warnings
---
 src/or/connection.c  | 4 ++--
 src/test/test_util.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/or/connection.c b/src/or/connection.c
index 20c758f57..957398985 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -2975,9 +2975,9 @@ global_write_bucket_low(connection_t *conn, size_t attempt, int priority)
   if (priority == 1) { /* old-style v1 query */
     /* Could we handle *two* of these requests within the next two seconds? */
     const or_options_t *options = get_options();
-    size_t can_write = smaller_bucket
+    size_t can_write = (size_t) (smaller_bucket
       + 2*(options->RelayBandwidthRate ? options->RelayBandwidthRate :
-                                         options->BandwidthRate);
+           options->BandwidthRate));
     if (can_write < 2*attempt)
       return 1;
   } else { /* v2 query */
diff --git a/src/test/test_util.c b/src/test/test_util.c
index 3dd2b51a3..24b43c899 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -5910,8 +5910,8 @@ test_util_monotonic_time(void *arg)
   {
     uint64_t units = monotime_msec_to_approx_coarse_stamp_units(5000);
     uint64_t ms = monotime_coarse_stamp_units_to_approx_msec(units);
-    tt_int_op(ms, OP_GE, 4950);
-    tt_int_op(ms, OP_LT, 5050);
+    tt_u64_op(ms, OP_GE, 4950);
+    tt_u64_op(ms, OP_LT, 5050);
   }
 
  done:

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits