Issue #6231 has been reported by luislavena (Luis Lavena).

----------------------------------------
Bug #6231: OpenSSL: Implicit conversion from long to int
https://bugs.ruby-lang.org/issues/6231

Author: luislavena (Luis Lavena)
Status: Assigned
Priority: Low
Assignee: MartinBosslet (Martin Bosslet)
Category: build
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2012-03-30 trunk 35174) [x86_64-darwin10.8.0]


=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


-- 
http://bugs.ruby-lang.org/