Skip to content

Commit

Permalink
fixed compile warnings treated as errors
Browse files Browse the repository at this point in the history
  • Loading branch information
makdharma committed Aug 17, 2016
1 parent d8004a8 commit 3e4be9f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/core/ext/transport/cronet/transport/cronet_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ static const char *op_id_string(enum e_op_id i) {
case OP_NUM_OPS:
return "OP_NUM_OPS";
}
return "UNKNOWN";
}

/*
Expand Down Expand Up @@ -533,7 +534,7 @@ static void convert_metadata_to_cronet_headers(
TODO (makdharma): Eliminate need to traverse the LL second time for perf.
*/
curr = head;
int num_headers = 0;
uint32_t num_headers = 0;
while (num_headers < num_headers_available) {
grpc_mdelem *mdelem = curr->md;
curr = curr->next;
Expand All @@ -557,7 +558,7 @@ static void convert_metadata_to_cronet_headers(
break;
}
}
*p_num_headers = num_headers;
*p_num_headers = (size_t)num_headers;
}

static int parse_grpc_header(const uint8_t *data) {
Expand Down Expand Up @@ -826,7 +827,7 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx,
stream_state->rs.length_field);
if (stream_state->rs.length_field > 0) {
stream_state->rs.read_buffer =
gpr_malloc(stream_state->rs.length_field);
gpr_malloc((size_t)stream_state->rs.length_field);
GPR_ASSERT(stream_state->rs.read_buffer);
stream_state->rs.remaining_bytes = stream_state->rs.length_field;
stream_state->rs.received_bytes = 0;
Expand Down

0 comments on commit 3e4be9f

Please sign in to comment.