SSL_set_fd() and fd type in Windows 64

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

SSL_set_fd() and fd type in Windows 64

sampo-5
On Windows, sockets and filedescriptors are HANDLES which are pointers.

This is all nice and fine on 32bit Windows.

However on 64bit windows int is 32bits and HANDLE is a 64bit pointer,
leading to following warning:

warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     if (!SSL_set_fd(bu->ssl, (int)bu->fd)) {

Is this something to worry about?

The platform is mingw-w64.

Cheers,
--Sampo
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: SSL_set_fd() and fd type in Windows 64

Pravesh Rai
We get such types of warning while doing compilation for x64 environment, but normally don't face any problem during run-time.
 
Thanks,
PK


On Tue, Nov 5, 2013 at 6:36 AM, <[hidden email]> wrote:
On Windows, sockets and filedescriptors are HANDLES which are pointers.

This is all nice and fine on 32bit Windows.

However on 64bit windows int is 32bits and HANDLE is a 64bit pointer,
leading to following warning:

warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     if (!SSL_set_fd(bu->ssl, (int)bu->fd)) {

Is this something to worry about?

The platform is mingw-w64.

Cheers,
--Sampo
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]