aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/network_benchmarks
diff options
context:
space:
mode:
authorGravatar David Klempner <klempner@google.com>2015-03-04 15:59:44 -0800
committerGravatar David Klempner <klempner@google.com>2015-03-04 15:59:44 -0800
commita4ac16cdc3b334a14eae54b358b7d8e3172256b8 (patch)
tree5330c20ccb72a1ba147727f189884b80b0d3d8e1 /test/core/network_benchmarks
parent0aad3d74577c55ee9d372082b3e0d6457de7a14a (diff)
Fix signed comparison warnings in low_level_ping_pong
Diffstat (limited to 'test/core/network_benchmarks')
-rw-r--r--test/core/network_benchmarks/low_level_ping_pong.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/core/network_benchmarks/low_level_ping_pong.c b/test/core/network_benchmarks/low_level_ping_pong.c
index f0a3e26c4e..a084c55a35 100644
--- a/test/core/network_benchmarks/low_level_ping_pong.c
+++ b/test/core/network_benchmarks/low_level_ping_pong.c
@@ -81,7 +81,7 @@ typedef struct thread_args {
/* Basic call to read() */
static int read_bytes(int fd, char *buf, size_t read_size, int spin) {
- int bytes_read = 0;
+ size_t bytes_read = 0;
int err;
do {
err = read(fd, buf + bytes_read, read_size - bytes_read);
@@ -198,7 +198,7 @@ static int epoll_read_bytes_spin(struct thread_args *args, char *buf) {
writes go directly out to the kernel.
*/
static int blocking_write_bytes(struct thread_args *args, char *buf) {
- int bytes_written = 0;
+ size_t bytes_written = 0;
int err;
size_t write_size = args->msg_size;
do {
@@ -586,10 +586,10 @@ static int run_benchmark(char *socket_type, thread_args *client_args,
static int run_all_benchmarks(int msg_size) {
int error = 0;
- int i;
+ size_t i;
for (i = 0; i < GPR_ARRAY_SIZE(test_strategies); ++i) {
test_strategy *test_strategy = &test_strategies[i];
- int j;
+ size_t j;
for (j = 0; j < GPR_ARRAY_SIZE(socket_types); ++j) {
thread_args *client_args = malloc(sizeof(thread_args));
thread_args *server_args = malloc(sizeof(thread_args));
@@ -620,7 +620,7 @@ int main(int argc, char **argv) {
int msg_size = -1;
char *read_strategy = NULL;
char *socket_type = NULL;
- int i;
+ size_t i;
const test_strategy *test_strategy = NULL;
int error = 0;