From 7c413b55455193be7dd00368128fe30b972dde52 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 23 Jul 2015 00:10:40 +0000 Subject: [PATCH] ossl_ssl.c: suppress warnings * ext/openssl/ossl_ssl.c (ossl_sslctx_setup): fix argument types to suppress shorten-64-to-32 and shorten-64-to-32 warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/openssl/ossl_ssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c index 47bbac92c5..81b5a40157 100644 --- a/ext/openssl/ossl_ssl.c +++ b/ext/openssl/ossl_ssl.c @@ -869,7 +869,7 @@ ossl_sslctx_setup(VALUE self) val = rb_iv_get(self, "@alpn_protocols"); if (!NIL_P(val)) { VALUE rprotos = ssl_encode_npn_protocols(val); - SSL_CTX_set_alpn_protos(ctx, StringValueCStr(rprotos), RSTRING_LEN(rprotos)); + SSL_CTX_set_alpn_protos(ctx, (const unsigned char *)StringValueCStr(rprotos), RSTRING_LENINT(rprotos)); OSSL_Debug("SSL ALPN values added"); } if (RTEST(rb_iv_get(self, "@alpn_select_cb"))) {