summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-24 06:27:49 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-24 06:27:49 +0000
commit9240eb3dfe10f4948f85b7abd0c57e2192d6550f (patch)
tree05d14c88f013a37c156d5bd8312d882f7890ed48
parenta0dd4fc552b89572eec22b7a1ab274bdf7a67298 (diff)
ossl.c: suppress warning
* ext/openssl/ossl.c (Init_ossl_locks): to suppress shorten-64-to-32 warning, re-apply part of r41879. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ext/openssl/ossl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c
index f315925..791d0f5 100644
--- a/ext/openssl/ossl.c
+++ b/ext/openssl/ossl.c
@@ -495,7 +495,7 @@ static void Init_ossl_locks(void)
if ((unsigned)num_locks >= INT_MAX / (int)sizeof(VALUE)) {
rb_raise(rb_eRuntimeError, "CRYPTO_num_locks() is too big: %d", num_locks);
}
- ossl_locks = (rb_nativethread_lock_t *) OPENSSL_malloc(num_locks * sizeof(rb_nativethread_lock_t));
+ ossl_locks = (rb_nativethread_lock_t *) OPENSSL_malloc(num_locks * (int)sizeof(rb_nativethread_lock_t));
if (!ossl_locks) {
rb_raise(rb_eNoMemError, "CRYPTO_num_locks() is too big: %d", num_locks);
}