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

[tor-commits] [tor/master] Fix a bunch of "implicit 64->32" warnings from introduce refactoring



commit 6c64681879cca488c2cc017b99ed1e7104da5049
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Fri Aug 3 11:31:04 2012 -0400

    Fix a bunch of "implicit 64->32" warnings from introduce refactoring
---
 src/or/rendservice.c      |    2 +-
 src/test/test_introduce.c |    2 +-
 src/test/test_replay.c    |   22 +++++++++++-----------
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index 3c5d821..3d8d3e9 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -1206,7 +1206,7 @@ rend_service_introduce(origin_circuit_t *circuit, const uint8_t *request,
   /* check for replay of PK-encrypted portion. */
   replay = replaycache_add_test_and_elapsed(
     intro_point->accepted_intro_rsa_parts,
-    parsed_req->ciphertext, parsed_req->ciphertext_len,
+    parsed_req->ciphertext, (int)parsed_req->ciphertext_len,
     &elapsed);
 
   if (replay) {
diff --git a/src/test/test_introduce.c b/src/test/test_introduce.c
index 4fbfd18..992d9cd 100644
--- a/src/test/test_introduce.c
+++ b/src/test/test_introduce.c
@@ -281,7 +281,7 @@ static void
 do_parse_test(uint8_t *plaintext, size_t plaintext_len, int phase)
 {
   crypto_pk_t *k = NULL;
-  int r;
+  ssize_t r;
   uint8_t *cell = NULL;
   size_t cell_len;
   rend_intro_cell_t *parsed_req = NULL;
diff --git a/src/test/test_replay.c b/src/test/test_replay.c
index 217b555..b08818f 100644
--- a/src/test/test_replay.c
+++ b/src/test/test_replay.c
@@ -44,7 +44,7 @@ test_replaycache_miss(void)
 
   result =
     replaycache_add_and_test_internal(1200, r, test_buffer,
-        strlen(test_buffer), NULL);
+        (int)strlen(test_buffer), NULL);
   test_eq(result, 0);
 
  done:
@@ -65,12 +65,12 @@ test_replaycache_hit(void)
 
   result =
     replaycache_add_and_test_internal(1200, r, test_buffer,
-        strlen(test_buffer), NULL);
+        (int)strlen(test_buffer), NULL);
   test_eq(result, 0);
 
   result =
     replaycache_add_and_test_internal(1300, r, test_buffer,
-        strlen(test_buffer), NULL);
+        (int)strlen(test_buffer), NULL);
   test_eq(result, 1);
 
  done:
@@ -91,17 +91,17 @@ test_replaycache_age(void)
 
   result =
     replaycache_add_and_test_internal(1200, r, test_buffer,
-        strlen(test_buffer), NULL);
+        (int)strlen(test_buffer), NULL);
   test_eq(result, 0);
 
   result =
     replaycache_add_and_test_internal(1300, r, test_buffer,
-        strlen(test_buffer), NULL);
+        (int)strlen(test_buffer), NULL);
   test_eq(result, 1);
 
   result =
     replaycache_add_and_test_internal(3000, r, test_buffer,
-        strlen(test_buffer), NULL);
+        (int)strlen(test_buffer), NULL);
   test_eq(result, 0);
 
  done:
@@ -123,12 +123,12 @@ test_replaycache_elapsed(void)
 
   result =
     replaycache_add_and_test_internal(1200, r, test_buffer,
-        strlen(test_buffer), NULL);
+        (int)strlen(test_buffer), NULL);
   test_eq(result, 0);
 
   result =
     replaycache_add_and_test_internal(1300, r, test_buffer,
-        strlen(test_buffer), &elapsed);
+        (int)strlen(test_buffer), &elapsed);
   test_eq(result, 1);
   test_eq(elapsed, 100);
 
@@ -150,17 +150,17 @@ test_replaycache_noexpire(void)
 
   result =
     replaycache_add_and_test_internal(1200, r, test_buffer,
-        strlen(test_buffer), NULL);
+        (int)strlen(test_buffer), NULL);
   test_eq(result, 0);
 
   result =
     replaycache_add_and_test_internal(1300, r, test_buffer,
-        strlen(test_buffer), NULL);
+        (int)strlen(test_buffer), NULL);
   test_eq(result, 1);
 
   result =
     replaycache_add_and_test_internal(3000, r, test_buffer,
-        strlen(test_buffer), NULL);
+        (int)strlen(test_buffer), NULL);
   test_eq(result, 1);
 
  done:

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