Skip to content
Snippets Groups Projects
Commit 5c648dc5 authored by makdharma's avatar makdharma Committed by GitHub
Browse files

Merge pull request #7766 from makdharma/cronet_e2e_take2

fixed compile warnings treated as errors
parents 9429717f 7ca91037
No related branches found
No related tags found
No related merge requests found
...@@ -236,6 +236,7 @@ static const char *op_id_string(enum e_op_id i) { ...@@ -236,6 +236,7 @@ static const char *op_id_string(enum e_op_id i) {
case OP_NUM_OPS: case OP_NUM_OPS:
return "OP_NUM_OPS"; return "OP_NUM_OPS";
} }
return "UNKNOWN";
} }
/* /*
...@@ -515,7 +516,7 @@ static void convert_metadata_to_cronet_headers( ...@@ -515,7 +516,7 @@ static void convert_metadata_to_cronet_headers(
cronet_bidirectional_stream_header **pp_headers, size_t *p_num_headers) { cronet_bidirectional_stream_header **pp_headers, size_t *p_num_headers) {
grpc_linked_mdelem *curr = head; grpc_linked_mdelem *curr = head;
/* Walk the linked list and get number of header fields */ /* Walk the linked list and get number of header fields */
uint32_t num_headers_available = 0; size_t num_headers_available = 0;
while (curr != NULL) { while (curr != NULL) {
curr = curr->next; curr = curr->next;
num_headers_available++; num_headers_available++;
...@@ -533,7 +534,7 @@ static void convert_metadata_to_cronet_headers( ...@@ -533,7 +534,7 @@ static void convert_metadata_to_cronet_headers(
TODO (makdharma): Eliminate need to traverse the LL second time for perf. TODO (makdharma): Eliminate need to traverse the LL second time for perf.
*/ */
curr = head; curr = head;
int num_headers = 0; size_t num_headers = 0;
while (num_headers < num_headers_available) { while (num_headers < num_headers_available) {
grpc_mdelem *mdelem = curr->md; grpc_mdelem *mdelem = curr->md;
curr = curr->next; curr = curr->next;
...@@ -557,7 +558,7 @@ static void convert_metadata_to_cronet_headers( ...@@ -557,7 +558,7 @@ static void convert_metadata_to_cronet_headers(
break; break;
} }
} }
*p_num_headers = num_headers; *p_num_headers = (size_t)num_headers;
} }
static int parse_grpc_header(const uint8_t *data) { static int parse_grpc_header(const uint8_t *data) {
...@@ -826,7 +827,7 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, ...@@ -826,7 +827,7 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx,
stream_state->rs.length_field); stream_state->rs.length_field);
if (stream_state->rs.length_field > 0) { if (stream_state->rs.length_field > 0) {
stream_state->rs.read_buffer = 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); GPR_ASSERT(stream_state->rs.read_buffer);
stream_state->rs.remaining_bytes = stream_state->rs.length_field; stream_state->rs.remaining_bytes = stream_state->rs.length_field;
stream_state->rs.received_bytes = 0; stream_state->rs.received_bytes = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment