From 7c00bc39eb39a26a9ad33de6e4a03fff45e86f5e Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 15 Jan 2016 14:24:34 +0100 Subject: mingw: avoid warnings when casting HANDLEs to int HANDLE is defined internally as a void *, but in many cases it is actually guaranteed to be a 32-bit integer. In these cases, GCC should not warn about a cast of a pointer to an integer of a different type because we know exactly what we are doing. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- compat/poll/poll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compat/poll') diff --git a/compat/poll/poll.c b/compat/poll/poll.c index db4e03ed79..b10adc780f 100644 --- a/compat/poll/poll.c +++ b/compat/poll/poll.c @@ -76,7 +76,7 @@ #ifdef WIN32_NATIVE -#define IsConsoleHandle(h) (((long) (h) & 3) == 3) +#define IsConsoleHandle(h) (((long) (intptr_t) (h) & 3) == 3) static BOOL IsSocketHandle (HANDLE h) -- cgit v1.3-6-g1900