Merge pull request #24198 from chrisse74/protoUtilsStaticCast

proto_utils.h: suppress conversion warning
pull/24567/head
Esun Kim 4 years ago committed by GitHub
commit 9936d7785c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      include/grpcpp/impl/codegen/proto_utils.h

@ -49,7 +49,7 @@ Status GenericSerialize(const grpc::protobuf::MessageLite& msg, ByteBuffer* bb,
"ProtoBufferWriter must be a subclass of "
"::protobuf::io::ZeroCopyOutputStream");
*own_buffer = true;
int byte_size = msg.ByteSizeLong();
int byte_size = static_cast<int>(msg.ByteSizeLong());
if ((size_t)byte_size <= GRPC_SLICE_INLINED_SIZE) {
Slice slice(byte_size);
// We serialize directly into the allocated slices memory

Loading…
Cancel
Save