ruby-changes:30097
From: nobu <ko1@a...>
Date: Wed, 24 Jul 2013 15:28:01 +0900 (JST)
Subject: [ruby-changes:30097] nobu:r42149 (trunk): ossl.c: suppress warning
nobu 2013-07-24 15:27:49 +0900 (Wed, 24 Jul 2013) New Revision: 42149 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42149 Log: ossl.c: suppress warning * ext/openssl/ossl.c (Init_ossl_locks): to suppress shorten-64-to-32 warning, re-apply part of r41879. Modified files: trunk/ext/openssl/ossl.c Index: ext/openssl/ossl.c =================================================================== --- ext/openssl/ossl.c (revision 42148) +++ ext/openssl/ossl.c (revision 42149) @@ -495,7 +495,7 @@ static void Init_ossl_locks(void) https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl.c#L495 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); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/