Fixed cast in endpoint_cfstream.cc

pull/18082/head
Prashant Jaikumar 6 years ago
parent 6177befe94
commit 1ee4706c7d
  1. 4
      src/core/lib/iomgr/endpoint_cfstream.cc

@ -182,7 +182,7 @@ static void ReadAction(void* arg, grpc_error* error) {
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Socket closed"), ep));
EP_UNREF(ep, "read");
} else {
if (read_size < len) {
if (read_size < static_cast<CFIndex>(len)) {
grpc_slice_buffer_trim_end(ep->read_slices, len - read_size, nullptr);
}
CallReadCb(ep, GRPC_ERROR_NONE);
@ -217,7 +217,7 @@ static void WriteAction(void* arg, grpc_error* error) {
CallWriteCb(ep, error);
EP_UNREF(ep, "write");
} else {
if (write_size < GRPC_SLICE_LENGTH(slice)) {
if (write_size < static_cast<CFIndex>(GRPC_SLICE_LENGTH(slice))) {
grpc_slice_buffer_undo_take_first(
ep->write_slices, grpc_slice_sub(slice, write_size, slice_len));
}

Loading…
Cancel
Save