diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-07-01 15:52:57 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-07-01 15:53:01 -0400 |
commit | 1597c423844de4da82cde58c9162d05ff5b28b40 (patch) | |
tree | 5d9f552d6899720e94d1e6e2c0f1b52f46dd2c54 /src/test/test_shared_random.c | |
parent | 3566ff05fd9b4b0e0d6c2667f11f769b63aeee4d (diff) | |
download | tor-1597c423844de4da82cde58c9162d05ff5b28b40.tar.gz tor-1597c423844de4da82cde58c9162d05ff5b28b40.zip |
Fix i386 conversion warnings
Diffstat (limited to 'src/test/test_shared_random.c')
-rw-r--r-- | src/test/test_shared_random.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/test_shared_random.c b/src/test/test_shared_random.c index 141c12b4f7..e5a7d2195f 100644 --- a/src/test/test_shared_random.c +++ b/src/test/test_shared_random.c @@ -302,7 +302,7 @@ test_sr_commit(void *arg) tt_assert(!tor_mem_is_zero((char *) our_commit->random_number, sizeof(our_commit->random_number))); /* Commit and reveal timestamp should be the same. */ - tt_int_op(our_commit->commit_ts, ==, our_commit->reveal_ts); + tt_u64_op(our_commit->commit_ts, ==, our_commit->reveal_ts); /* We should have a hashed reveal. */ tt_assert(!tor_mem_is_zero(our_commit->hashed_reveal, sizeof(our_commit->hashed_reveal))); @@ -404,14 +404,14 @@ test_encoding(void *arg) { /* Test the reveal encoded value. */ tt_int_op(0, ==, reveal_decode(encoded_reveal, &parsed_commit)); - tt_uint_op(ts, ==, parsed_commit.reveal_ts); + tt_u64_op(ts, ==, parsed_commit.reveal_ts); tt_mem_op(hashed_rand, OP_EQ, parsed_commit.random_number, sizeof(hashed_rand)); /* Test the commit encoded value. */ memset(&parsed_commit, 0, sizeof(parsed_commit)); tt_int_op(0, ==, commit_decode(encoded_commit, &parsed_commit)); - tt_uint_op(ts, ==, parsed_commit.commit_ts); + tt_u64_op(ts, ==, parsed_commit.commit_ts); tt_mem_op(encoded_commit, OP_EQ, parsed_commit.encoded_commit, sizeof(parsed_commit.encoded_commit)); tt_mem_op(hashed_reveal, OP_EQ, parsed_commit.hashed_reveal, @@ -803,7 +803,7 @@ test_sr_compute_srv(void *arg) /* Check the result against the test vector */ current_srv = sr_state_get_current_srv(); tt_assert(current_srv); - tt_int_op(current_srv->num_reveals, ==, 3); + tt_u64_op(current_srv->num_reveals, ==, 3); tt_str_op(hex_str((char*)current_srv->value, 32), ==, SRV_TEST_VECTOR); @@ -895,7 +895,7 @@ test_sr_get_majority_srv_from_votes(void *arg) set_num_srv_agreements(7); chosen_srv = get_majority_srv_from_votes(votes, 1); tt_assert(chosen_srv); - tt_int_op(chosen_srv->num_reveals, ==, 42); + tt_u64_op(chosen_srv->num_reveals, ==, 42); tt_mem_op(chosen_srv->value, OP_EQ, SRV_1, sizeof(chosen_srv->value)); done: @@ -919,7 +919,7 @@ test_utils(void *arg) memcpy(srv->value, srv_value, sizeof(srv->value)); dup_srv = srv_dup(srv); tt_assert(dup_srv); - tt_int_op(dup_srv->num_reveals, ==, srv->num_reveals); + tt_u64_op(dup_srv->num_reveals, ==, srv->num_reveals); tt_mem_op(dup_srv->value, OP_EQ, srv->value, sizeof(srv->value)); tor_free(srv); tor_free(dup_srv); |