Fix pointer to integer cast warnings

This fixes warning: cast to pointer from integer of different size.
In Windows platform, long is 4 bytes. So, void* is first cast to
intptr_t then to int.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/630>
This commit is contained in:
Biswapriyo Nath 2021-09-11 18:16:23 +05:30 committed by PulseAudio Marge Bot
parent 747efc1017
commit f5b94eff76
5 changed files with 18 additions and 15 deletions

View file

@ -109,8 +109,8 @@ static HANDLE
HandleFromFd (int fd)
{
/* since socket() returns a HANDLE already, try that first */
if (IsSocketHandle((HANDLE) fd))
return ((HANDLE) fd);
if (IsSocketHandle(PA_INT_TO_PTR(fd)))
return PA_INT_TO_PTR(fd);
return ((HANDLE) _get_osfhandle(fd));
}