소스 검색

Cast malloc result

Nate Armstrong 7 년 전
부모
커밋
a2b983ab62
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Sources/CgRPC/shim/channel.c

+ 1 - 1
Sources/CgRPC/shim/channel.c

@@ -49,7 +49,7 @@ cgrpc_channel *cgrpc_channel_create_secure(const char *address,
   channel_args.args = args;
   channel_args.num_args = num_args;
 
-  grpc_ssl_pem_key_cert_pair *client_credentials = malloc(sizeof (struct grpc_ssl_pem_key_cert_pair));
+  grpc_ssl_pem_key_cert_pair *client_credentials = (grpc_ssl_pem_key_cert_pair *) malloc(sizeof (struct grpc_ssl_pem_key_cert_pair));
   client_credentials->cert_chain = client_certs;
   client_credentials->private_key = client_private_key;
   if (client_certs == NULL || client_private_key == NULL) {