Bug #6231
closedOpenSSL: Implicit conversion from long to int
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-32]
(unsigned char *)RSTRING_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-32]
(unsigned char *)RSTRING_PTR(salt), RSTRING_LEN(salt),
^~~~~~~~~~~~~~~~~
../../../include/ruby/ruby.h:692:28: note: expanded from:
RSTRING(str)->as.heap.len)
=end