Merge pull request #6514 from yang-g/va_start

Change argument type to avoid undefined behavior
pull/6445/head
Jan Tattermusch 9 years ago
commit 8b382748fd
  1. 8
      test/core/client_config/lb_policies_test.c

@ -438,9 +438,9 @@ static grpc_call **perform_multirequest(servers_fixture *f,
return calls; return calls;
} }
static void assert_channel_connectivity( static void assert_channel_connectivity(grpc_channel *ch,
grpc_channel *ch, size_t num_accepted_conn_states, size_t num_accepted_conn_states,
grpc_connectivity_state accepted_conn_state, ...) { int accepted_conn_state, ...) {
size_t i; size_t i;
grpc_channel_stack *client_stack; grpc_channel_stack *client_stack;
grpc_channel_element *client_channel_filter; grpc_channel_element *client_channel_filter;
@ -456,7 +456,7 @@ static void assert_channel_connectivity(
grpc_exec_ctx_finish(&exec_ctx); grpc_exec_ctx_finish(&exec_ctx);
va_start(ap, accepted_conn_state); va_start(ap, accepted_conn_state);
for (i = 0; i < num_accepted_conn_states; i++) { for (i = 0; i < num_accepted_conn_states; i++) {
if (actual_conn_state == accepted_conn_state) { if ((int)actual_conn_state == accepted_conn_state) {
break; break;
} }
accepted_conn_state = va_arg(ap, grpc_connectivity_state); accepted_conn_state = va_arg(ap, grpc_connectivity_state);

Loading…
Cancel
Save