aboutsummaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2016-01-15 14:24:39 +0100
committerJunio C Hamano <gitster@pobox.com>2016-01-15 14:02:37 -0800
commit83c90da3c145c7f39cb321a3d3db59c167abd572 (patch)
tree0c1965c758e6c013afeafcd09e8fece846ca3b1b /compat
parent7c00bc39eb39a26a9ad33de6e4a03fff45e86f5e (diff)
downloadgit-83c90da3c145c7f39cb321a3d3db59c167abd572.tar.gz
git-83c90da3c145c7f39cb321a3d3db59c167abd572.tar.xz
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 <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat')
-rw-r--r--compat/win32/pthread.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/compat/win32/pthread.h b/compat/win32/pthread.h
index 8ad187344..d3dd87291 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;