[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] remote: Fix TLS transport on Windows



On 11/22/2010 02:50 PM, Matthias Bolte wrote:
> I just used what'a in curl, as directly casting from void* to int
> would give this error on 64bit platform:
> 
>   error: cast from pointer to integer of different size [-Wpointer-to-int-cast]

And casting to long is no better on windows (where long is still 32-bit
even though pointers are 64-bit).

> 
> (Yes, this is tested on Linux 64bit, as I didn't setup mingw-w64 yet)
> 
> Casting to size_t works too.

Not only does it avoid the warning, but it also matches the signature of
send() and recv().

> 
> Here's a v2 that casts to size_t and has an improved commit message.

ACK.

-- 
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]