From: Johannes Schindelin Date: Fri, 15 Jan 2016 13:24:39 +0000 (+0100) Subject: mingw: squash another warning about a cast X-Git-Tag: v2.8.0-rc0~92^2~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/83c90da3c145c7f39cb321a3d3db59c167abd572 mingw: squash another warning about a cast MSys2's compiler is correct that casting a "void *" to a "DWORD" loses precision, but in the case of pthread_exit() we know that the value fits into a DWORD. Just like casting handles to DWORDs, let's work around this issue by casting to "intrptr_t" first, and immediately cast to the final type. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- diff --git a/compat/win32/pthread.h b/compat/win32/pthread.h index 8ad187344f..d3dd872918 100644 --- a/compat/win32/pthread.h +++ b/compat/win32/pthread.h @@ -77,7 +77,7 @@ extern pthread_t pthread_self(void); static inline int pthread_exit(void *ret) { - ExitThread((DWORD)ret); + ExitThread((DWORD)(intptr_t)ret); } typedef DWORD pthread_key_t;