From f96dfc3cf89f0e10a5356ca1bcfd4697410a75c4 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 10 Sep 2015 14:43:18 -0700 Subject: First round of fixing up implicit 64->32 bit conversions --- test/core/support/murmur_hash_test.c | 4 ++-- test/core/support/stack_lockfree_test.c | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'test/core/support') diff --git a/test/core/support/murmur_hash_test.c b/test/core/support/murmur_hash_test.c index 1e5279f462..1762486776 100644 --- a/test/core/support/murmur_hash_test.c +++ b/test/core/support/murmur_hash_test.c @@ -57,8 +57,8 @@ static void verification_test(hash_func hash, gpr_uint32 expected) { the seed */ for (i = 0; i < 256; i++) { - key[i] = (uint8_t)i; - hashes[i] = hash(key, i, 256u - i); + key[i] = (gpr_uint8)i; + hashes[i] = hash(key, i, (gpr_uint32)(256u - i)); } /* Then hash the result array */ diff --git a/test/core/support/stack_lockfree_test.c b/test/core/support/stack_lockfree_test.c index 4a2a0532d8..0f49e6fa52 100644 --- a/test/core/support/stack_lockfree_test.c +++ b/test/core/support/stack_lockfree_test.c @@ -62,7 +62,7 @@ static void test_serial_sized(size_t size) { /* Now add repeatedly more items and check them */ for (i = 1; i < size; i *= 2) { for (j = 0; j <= i; j++) { - GPR_ASSERT(gpr_stack_lockfree_push(stack, j) == (j == 0)); + GPR_ASSERT(gpr_stack_lockfree_push(stack, (int)j) == (j == 0)); } for (j = 0; j <= i; j++) { GPR_ASSERT(gpr_stack_lockfree_pop(stack) == (int)(i - j)); @@ -118,7 +118,7 @@ static void test_mt_sized(size_t size, int nth) { stack = gpr_stack_lockfree_create(size); for (i = 0; i < nth; i++) { args[i].stack = stack; - args[i].stack_size = size; + args[i].stack_size = (int)size; args[i].nthreads = nth; args[i].rank = i; args[i].sum = 0; @@ -137,7 +137,8 @@ static void test_mt_sized(size_t size, int nth) { } static void test_mt() { - size_t size, nth; + size_t size; + int nth; for (nth = 1; nth < MAX_THREADS; nth++) { for (size = 128; size < MAX_STACK_SIZE; size *= 2) { test_mt_sized(size, nth); -- cgit v1.2.3