浏览代码

Fix integer/pointer sizes cast

Samuel Thibault 13 年之前
父节点
当前提交
51efe41811
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      include/pthread_win32/pthread.h

+ 2 - 2
include/pthread_win32/pthread.h

@@ -136,7 +136,7 @@ static inline int pthread_cancel (pthread_t thread) {
 }
 
 static inline void pthread_exit (void *res) {
-  ExitThread((DWORD) res);
+  ExitThread((DWORD_PTR) (DWORD) res);
 }
 
 static inline int pthread_join (pthread_t thread, void **res) {
@@ -154,7 +154,7 @@ again:
   if (res) {
     DWORD _res;
     if (GetExitCodeThread(thread, &_res))
-      *res = (void *)_res;
+      *res = (void *)(DWORD_PTR)_res;
   }
   return 0;
 }