Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
include/windows/unistd.h: Fixed type cast warning on Windows.
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]> Signed-off-by: Ilya Maximets <[email protected]>
- Loading branch information