aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ruby
diff options
context:
space:
mode:
authorGravatar Tim Emiola <temiola@google.com>2015-01-26 12:55:47 -0800
committerGravatar Tim Emiola <temiola@google.com>2015-01-26 12:55:47 -0800
commit6aa182fb2c0d518335b71c0fb5552342e2d2bee9 (patch)
tree70193b28937c800fff0f2078a81d458a33d6472a /src/ruby
parent0a7d85893c44fee9c76dc72448425a3ef5b7ab97 (diff)
Cleans up some compiler warnings
Diffstat (limited to 'src/ruby')
-rw-r--r--src/ruby/ext/grpc/rb_credentials.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ruby/ext/grpc/rb_credentials.c b/src/ruby/ext/grpc/rb_credentials.c
index 31f47f3b76..43cc21aeca 100644
--- a/src/ruby/ext/grpc/rb_credentials.c
+++ b/src/ruby/ext/grpc/rb_credentials.c
@@ -214,6 +214,8 @@ static VALUE grpc_rb_credentials_init(int argc, VALUE *argv, VALUE self) {
VALUE pem_cert_chain = Qnil;
grpc_rb_credentials *wrapper = NULL;
grpc_credentials *creds = NULL;
+ grpc_ssl_pem_key_cert_pair key_cert_pair;
+ MEMZERO(&key_cert_pair, grpc_ssl_pem_key_cert_pair, 1);
/* TODO: Remove mandatory arg when we support default roots. */
/* "12" == 1 mandatory arg, 2 (credentials) is optional */
rb_scan_args(argc, argv, "12", &pem_root_certs, &pem_private_key,
@@ -228,8 +230,8 @@ static VALUE grpc_rb_credentials_init(int argc, VALUE *argv, VALUE self) {
if (pem_private_key == Qnil && pem_cert_chain == Qnil) {
creds = grpc_ssl_credentials_create(RSTRING_PTR(pem_root_certs), NULL);
} else {
- grpc_ssl_pem_key_cert_pair key_cert_pair = {RSTRING_PTR(pem_private_key),
- RSTRING_PTR(pem_cert_chain)};
+ key_cert_pair.private_key = RSTRING_PTR(pem_private_key);
+ key_cert_pair.cert_chain = RSTRING_PTR(pem_cert_chain);
creds = grpc_ssl_credentials_create(
RSTRING_PTR(pem_root_certs), &key_cert_pair);
}