[PATCH] D49782: [libcxx] [windows] Fix warning about comparing ints of different signs

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 25 11:24:38 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL337946: [windows] Fix warning about comparing ints of different signs (authored by mstorsjo, committed by ).
Herald added subscribers: llvm-commits, christof.

Changed prior to commit:
  https://reviews.llvm.org/D49782?vs=157215&id=157321#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D49782

Files:
  libcxx/trunk/src/support/win32/thread_win32.cpp


Index: libcxx/trunk/src/support/win32/thread_win32.cpp
===================================================================
--- libcxx/trunk/src/support/win32/thread_win32.cpp
+++ libcxx/trunk/src/support/win32/thread_win32.cpp
@@ -254,9 +254,10 @@
 int __libcpp_tls_create(__libcpp_tls_key* __key,
                         void(_LIBCPP_TLS_DESTRUCTOR_CC* __at_exit)(void*))
 {
-  *__key = FlsAlloc(__at_exit);
-  if (*__key == FLS_OUT_OF_INDEXES)
+  DWORD index = FlsAlloc(__at_exit);
+  if (index == FLS_OUT_OF_INDEXES)
     return GetLastError();
+  *__key = index;
   return 0;
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49782.157321.patch
Type: text/x-patch
Size: 586 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180725/5ce45457/attachment.bin>


More information about the llvm-commits mailing list