aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/support
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-09-10 14:43:18 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-09-10 14:43:18 -0700
commitf96dfc3cf89f0e10a5356ca1bcfd4697410a75c4 (patch)
tree81040d4efce2bb330a213d3ea54ae6e64c3c4870 /test/core/support
parent0ebfaa04b0cd38ccf273746195ca8c8ac7f7d4d6 (diff)
First round of fixing up implicit 64->32 bit conversions
Diffstat (limited to 'test/core/support')
-rw-r--r--test/core/support/murmur_hash_test.c4
-rw-r--r--test/core/support/stack_lockfree_test.c7
2 files changed, 6 insertions, 5 deletions
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);