]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Avoid clang warnings from implicit off_t->size_t cast
authorNick Mathewson <nickm@torproject.org>
Sat, 23 Mar 2013 22:50:21 +0000 (18:50 -0400)
committerNick Mathewson <nickm@torproject.org>
Sat, 23 Mar 2013 22:50:21 +0000 (18:50 -0400)
src/common/crypto_curve25519.c
src/test/test_crypto.c

index 3e4004db2e7e8bfe01e773d6cb89a7acc55b03f0..88c723f37c2c432b8baacb0cb024a5743490a03a 100644 (file)
@@ -169,7 +169,7 @@ curve25519_keypair_read_from_file(curve25519_keypair_t *keypair_out,
 
  end:
   if (content) {
-    memwipe(content, 0, st.st_size);
+    memwipe(content, 0, (size_t) st.st_size);
     tor_free(content);
   }
   if (r != 0) {
index c531c6083841738d56f95087517b1a15ca71d28e..fcaa0813e7fb0de70d2961a751bedbc64774a1e9 100644 (file)
@@ -1097,7 +1097,7 @@ test_crypto_curve25519_persist(void *arg)
   tor_free(tag);
 
   content[69] ^= 0xff;
-  tt_int_op(0, ==, write_bytes_to_file(fname, content, st.st_size, 1));
+  tt_int_op(0, ==, write_bytes_to_file(fname, content, (size_t)st.st_size, 1));
   tt_int_op(-1, ==, curve25519_keypair_read_from_file(&keypair2, &tag, fname));
 
  done: