<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 29, 2013 at 5:03 AM, Timur Iskhodzhanov <span dir="ltr"><<a href="mailto:timurrrr@google.com" target="_blank">timurrrr@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: timurrrr<br>
Date: Wed May 29 07:03:49 2013<br>
New Revision: 182848<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=182848&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=182848&view=rev</a><br>
Log:<br>
Fix MSVC warnings at the -W2 level<br>
<br>
Modified:<br>
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_quarantine.h<br>
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_thread_registry.cc<br>
<br>
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_quarantine.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_quarantine.h?rev=182848&r1=182847&r2=182848&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_quarantine.h?rev=182848&r1=182847&r2=182848&view=diff</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_quarantine.h (original)<br>
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_quarantine.h Wed May 29 07:03:49 2013<br>
@@ -147,7 +147,9 @@ class QuarantineCache {<br>
       return 0;<br>
     QuarantineBatch *b = list_.front();<br>
     list_.pop_front();<br>
-    SizeAdd(-b->size);<br>
+    // FIXME: should probably add SizeSub method?<br>
+    // See <a href="https://code.google.com/p/thread-sanitizer/issues/detail?id=20" target="_blank">https://code.google.com/p/thread-sanitizer/issues/detail?id=20</a><br>
+    SizeAdd(0 - b->size);<br></blockquote><div><br></div><div style>This seems like a strange transformation to make - what was wrong with the original code? (does SizeAdd take an unsigned? If so, this doesn't seem like a great improvement...)</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
     return b;<br>
   }<br>
<br>
<br>
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_thread_registry.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_thread_registry.cc?rev=182848&r1=182847&r2=182848&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_thread_registry.cc?rev=182848&r1=182847&r2=182848&view=diff</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_thread_registry.cc (original)<br>
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_thread_registry.cc Wed May 29 07:03:49 2013<br>
@@ -85,7 +85,7 @@ void ThreadContextBase::Reset() {<br>
<br>
 // ThreadRegistry implementation.<br>
<br>
-const u32 ThreadRegistry::kUnknownTid = -1U;<br>
+const u32 ThreadRegistry::kUnknownTid = ~0U;<br>
<br>
 ThreadRegistry::ThreadRegistry(ThreadContextFactory factory, u32 max_threads,<br>
                                u32 thread_quarantine_size)<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div></div>