aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/surface
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-09-10 11:47:15 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-09-10 11:47:15 -0700
commit32ca48ce0b963949ff29d2dcd526b174679779aa (patch)
treee1203e29dbc0827fe4e9eed5737b3f1589d44f34 /test/core/surface
parentbe947697d7c5edb1f67c9df5ef024e3eaf98e9e6 (diff)
Core compiles with -Wsign-conversion
Diffstat (limited to 'test/core/surface')
-rw-r--r--test/core/surface/byte_buffer_reader_test.c8
-rw-r--r--test/core/surface/completion_queue_test.c8
-rw-r--r--test/core/surface/lame_client_test.c2
3 files changed, 9 insertions, 9 deletions
diff --git a/test/core/surface/byte_buffer_reader_test.c b/test/core/surface/byte_buffer_reader_test.c
index d9c60e4212..560e0ac7b2 100644
--- a/test/core/surface/byte_buffer_reader_test.c
+++ b/test/core/surface/byte_buffer_reader_test.c
@@ -113,14 +113,14 @@ static void test_read_none_compressed_slice(void) {
}
static void read_compressed_slice(grpc_compression_algorithm algorithm,
- int input_size) {
+ size_t input_size) {
gpr_slice input_slice;
gpr_slice_buffer sliceb_in;
gpr_slice_buffer sliceb_out;
grpc_byte_buffer *buffer;
grpc_byte_buffer_reader reader;
gpr_slice read_slice;
- int read_count = 0;
+ size_t read_count = 0;
gpr_slice_buffer_init(&sliceb_in);
gpr_slice_buffer_init(&sliceb_out);
@@ -149,13 +149,13 @@ static void read_compressed_slice(grpc_compression_algorithm algorithm,
}
static void test_read_gzip_compressed_slice(void) {
- const int INPUT_SIZE = 2048;
+ const size_t INPUT_SIZE = 2048;
LOG_TEST("test_read_gzip_compressed_slice");
read_compressed_slice(GRPC_COMPRESS_GZIP, INPUT_SIZE);
}
static void test_read_deflate_compressed_slice(void) {
- const int INPUT_SIZE = 2048;
+ const size_t INPUT_SIZE = 2048;
LOG_TEST("test_read_deflate_compressed_slice");
read_compressed_slice(GRPC_COMPRESS_DEFLATE, INPUT_SIZE);
}
diff --git a/test/core/surface/completion_queue_test.c b/test/core/surface/completion_queue_test.c
index c382b2a5aa..0eeb5dac45 100644
--- a/test/core/surface/completion_queue_test.c
+++ b/test/core/surface/completion_queue_test.c
@@ -177,7 +177,7 @@ typedef struct test_thread_options {
gpr_event on_phase1_done;
gpr_event *phase2;
gpr_event on_finished;
- int events_triggered;
+ size_t events_triggered;
int id;
grpc_completion_queue *cc;
} test_thread_options;
@@ -251,14 +251,14 @@ static void consumer_thread(void *arg) {
}
}
-static void test_threading(int producers, int consumers) {
+static void test_threading(size_t producers, size_t consumers) {
test_thread_options *options =
gpr_malloc((producers + consumers) * sizeof(test_thread_options));
gpr_event phase1 = GPR_EVENT_INIT;
gpr_event phase2 = GPR_EVENT_INIT;
grpc_completion_queue *cc = grpc_completion_queue_create(NULL);
- int i;
- int total_consumed = 0;
+ size_t i;
+ size_t total_consumed = 0;
static int optid = 101;
gpr_log(GPR_INFO, "%s: %d producers, %d consumers", "test_threading",
diff --git a/test/core/surface/lame_client_test.c b/test/core/surface/lame_client_test.c
index 96434193c9..0d29bea555 100644
--- a/test/core/surface/lame_client_test.c
+++ b/test/core/surface/lame_client_test.c
@@ -82,7 +82,7 @@ int main(int argc, char **argv) {
op->flags = 0;
op->reserved = NULL;
op++;
- error = grpc_call_start_batch(call, ops, op - ops, tag(1), NULL);
+ error = grpc_call_start_batch(call, ops, (size_t)(op - ops), tag(1), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
/* the call should immediately fail */