Bug #6231

OpenSSL: Implicit conversion from long to int

Added by Luis Lavena over 3 years ago. Updated about 3 years ago.

[ruby-core:43955]
Status:Closed
Priority:Normal
Assignee:Martin Bosslet
ruby -v:ruby 2.0.0dev (2012-03-30 trunk 35174) [x86_64-darwin10.8.0] Backport:

Description

=begin
Hello,

The following warnings were triggered by clang in OpenSSL

compiling ../../../ext/openssl/ossl_pkcs5.c
../../../ext/openssl/ossl_pkcs5.c:39:46: warning: implicit conversion loses integer precision: 'long' to 'int'
[-Wshorten-64-to-32]
if (PKCS5_PBKDF2_HMAC(RSTRING_PTR(pass), RSTRING_LEN(pass),
~~~~~~~~~~~~~~~~
../../../include/ruby/ruby.h:691:6: note: expanded from:
RSTRING_EMBED_LEN(str) : \
^
../../../include/ruby/ruby.h:687:6: note: expanded from:
(long)((RBASIC(str)->flags >> RSTRING_EMBED_LEN_SHIFT) & \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../ext/openssl/ossl_pkcs5.c:39:46: warning: implicit conversion loses integer precision: 'long' to 'int'
[-Wshorten-64-to-32]
if (PKCS5_PBKDF2_HMAC(RSTRING_PTR(pass), RSTRING_LEN(pass),
~~~~~~~~~~~~~~~~
../../../include/ruby/ruby.h:692:28: note: expanded from:
RSTRING(str)->as.heap.len)
^
../../../ext/openssl/ossl_pkcs5.c:40:42: warning: implicit conversion loses integer precision: 'long' to 'int'
-Wshorten-64-to-32RSTRING_PTR(salt), RSTRING_LEN(salt),
~~~~~~~~~~~~~~~~
../../../include/ruby/ruby.h:691:6: note: expanded from:
RSTRING_EMBED_LEN(str) : \
^
../../../include/ruby/ruby.h:687:6: note: expanded from:
(long)((RBASIC(str)->flags >> RSTRING_EMBED_LEN_SHIFT) & \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../ext/openssl/ossl_pkcs5.c:40:42: warning: implicit conversion loses integer precision: 'long' to 'int'
-Wshorten-64-to-32RSTRING_PTR(salt), RSTRING_LEN(salt),
~~~~~~~~~~~~~~~~
../../../include/ruby/ruby.h:692:28: note: expanded from:
RSTRING(str)->as.heap.len)
=end

History

#1 Updated by Martin Bosslet about 3 years ago

  • Status changed from Assigned to Closed

Was fixed by nobu in r35428. Thanks!

Also available in: Atom PDF