Subject: | Invalid conversion between IVs and pointers |
At many places Net::SSLeay uses casts pointers to IV like: (IV)pointer
which causes compiler to complain: warning: cast from pointer to integer of different size
Proposal 1: replace (IV)pointer with PTR2IV(pointer) - 14 places in total
Proposal 2: The reverse problem at 3 places + patch:
- cb = (ssleay_ctx_passwd_cb_t*)SvIV( *hash_value );
+ cb = INT2PTR(ssleay_ctx_passwd_cb_t*, SvIV( *hash_value ));
- cb = (ssleay_session_secret_cb_t*)SvIV( *hash_value );
+ cb = INT2PTR(ssleay_session_secret_cb_t*, SvIV( *hash_value ));
- cb = (ssleay_ctx_cert_verify_cb_t*)SvIV( *hash_value );
+ cb = INT2PTR(ssleay_ctx_cert_verify_cb_t*, SvIV( *hash_value ));
--
kmx
which causes compiler to complain: warning: cast from pointer to integer of different size
Proposal 1: replace (IV)pointer with PTR2IV(pointer) - 14 places in total
Proposal 2: The reverse problem at 3 places + patch:
- cb = (ssleay_ctx_passwd_cb_t*)SvIV( *hash_value );
+ cb = INT2PTR(ssleay_ctx_passwd_cb_t*, SvIV( *hash_value ));
- cb = (ssleay_session_secret_cb_t*)SvIV( *hash_value );
+ cb = INT2PTR(ssleay_session_secret_cb_t*, SvIV( *hash_value ));
- cb = (ssleay_ctx_cert_verify_cb_t*)SvIV( *hash_value );
+ cb = INT2PTR(ssleay_ctx_cert_verify_cb_t*, SvIV( *hash_value ));
--
kmx