On 9/3/21 18:01, Michael Santana wrote:
> 
> 
> On 8/26/21 11:45 AM, Sergey Madaminov wrote:
>> Currently, the function call type cast for getting file handle
>> produces a warning during OvS compilation on Windows with the following
>> message:
>>
>> ```
>> ..\include\windows\unistd.h:97:25: warning: cast from function call of type
>> 'intptr_t' (aka 'int') to non-matching type 'HANDLE' (aka 'void *')
>> [-Wbad-function-cast]
>>      HANDLE h = (HANDLE) _get_osfhandle(fd);
>> ```
>>
>> There is a function `LongToHandle()` to perform such cast [1].
>> But as `intptr_t` can be either `long long` for 64-bit or `int` for
>> 32-bit, instead of clogging the code with `#ifdef` macros to use
>> different cast functions, we can perform this cast directly.
>>
>> Signed-off-by: Sergey Madaminov <[email protected]>
> Acked-by: Michael Santana <[email protected]>

Thanks!  Applied.

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to