[compiler-rt] f0714cb - [sanitizer] Fix warning on windows

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 16 19:17:14 PDT 2020


Author: Vitaly Buka
Date: 2020-03-16T19:17:03-07:00
New Revision: f0714cbb6a91d0e2707d35508394607125ecb4ac

URL: https://github.com/llvm/llvm-project/commit/f0714cbb6a91d0e2707d35508394607125ecb4ac
DIFF: https://github.com/llvm/llvm-project/commit/f0714cbb6a91d0e2707d35508394607125ecb4ac.diff

LOG: [sanitizer] Fix warning on windows

Return value is not used anyway as PTHREAD_JOIN is not implemented.

Added: 
    

Modified: 
    compiler-rt/lib/sanitizer_common/tests/sanitizer_pthread_wrappers.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_pthread_wrappers.h b/compiler-rt/lib/sanitizer_common/tests/sanitizer_pthread_wrappers.h
index f806ee1ea4f5..5c8d3c27dc90 100644
--- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_pthread_wrappers.h
+++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_pthread_wrappers.h
@@ -35,9 +35,9 @@ struct PthreadHelperCreateThreadInfo {
 inline DWORD WINAPI PthreadHelperThreadProc(void *arg) {
   PthreadHelperCreateThreadInfo *start_data =
       reinterpret_cast<PthreadHelperCreateThreadInfo*>(arg);
-  void *ret = (start_data->start_routine)(start_data->arg);
+  (start_data->start_routine)(start_data->arg);
   delete start_data;
-  return (DWORD)ret;
+  return 0;
 }
 
 inline void PTHREAD_CREATE(pthread_t *thread, void *attr,
@@ -60,7 +60,7 @@ inline void PTHREAD_JOIN(pthread_t thread, void **value_ptr) {
 
 inline void pthread_exit(void *retval) {
   ASSERT_EQ(0, retval) << "Nonzero retval is not supported yet.";
-  ExitThread((DWORD)retval);
+  ExitThread(0);
 }
 #endif  // _WIN32
 


        


More information about the llvm-commits mailing list