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 <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
59de49f80d
commit
7c00bc39eb
@ -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)
|
||||
|
Reference in New Issue
Block a user