Skip to content

Commit 7c413b5

Browse files
committedJul 23, 2015
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
1 parent dfec9d9 commit 7c413b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎ext/openssl/ossl_ssl.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ ossl_sslctx_setup(VALUE self)
869869
val = rb_iv_get(self, "@alpn_protocols");
870870
if (!NIL_P(val)) {
871871
VALUE rprotos = ssl_encode_npn_protocols(val);
872-
SSL_CTX_set_alpn_protos(ctx, StringValueCStr(rprotos), RSTRING_LEN(rprotos));
872+
SSL_CTX_set_alpn_protos(ctx, (const unsigned char *)StringValueCStr(rprotos), RSTRING_LENINT(rprotos));
873873
OSSL_Debug("SSL ALPN values added");
874874
}
875875
if (RTEST(rb_iv_get(self, "@alpn_select_cb"))) {

0 commit comments

Comments
 (0)