From 594d5077cd52c52f3909df8766637622a0b2ddb9 Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Wed, 8 May 2019 12:19:00 -0400 Subject: [PATCH] Evil: fix warning on 64 bits Summary: int is 32 bits, HANDLE is void *, so cast to uintptr_t in between Test Plan: compilation Reviewers: raster, cedric, zmike Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8865 --- src/lib/evil/evil_fcntl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/evil/evil_fcntl.c b/src/lib/evil/evil_fcntl.c index 26d596a030..e222f2bf73 100644 --- a/src/lib/evil/evil_fcntl.c +++ b/src/lib/evil/evil_fcntl.c @@ -44,7 +44,7 @@ int fcntl(int fd, int cmd, ...) HANDLE h; DWORD flag; - h = _is_socket(fd) ? (HANDLE)fd : (HANDLE)_get_osfhandle(fd); + h = _is_socket(fd) ? (HANDLE)(uintptr_t)fd : (HANDLE)_get_osfhandle(fd); if (h == INVALID_HANDLE_VALUE) return -1; @@ -64,7 +64,7 @@ int fcntl(int fd, int cmd, ...) HANDLE h; long flag; - h = _is_socket(fd) ? (HANDLE)fd : (HANDLE)_get_osfhandle(fd); + h = _is_socket(fd) ? (HANDLE)(uintptr_t)fd : (HANDLE)_get_osfhandle(fd); if (h == INVALID_HANDLE_VALUE) return -1;