[compiler-rt] r182848 - Fix MSVC warnings at the -W2 level
Timur Iskhodzhanov
timurrrr at google.com
Wed May 29 05:03:49 PDT 2013
Author: timurrrr
Date: Wed May 29 07:03:49 2013
New Revision: 182848
URL: http://llvm.org/viewvc/llvm-project?rev=182848&view=rev
Log:
Fix MSVC warnings at the -W2 level
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_quarantine.h
compiler-rt/trunk/lib/sanitizer_common/sanitizer_thread_registry.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_quarantine.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_quarantine.h?rev=182848&r1=182847&r2=182848&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_quarantine.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_quarantine.h Wed May 29 07:03:49 2013
@@ -147,7 +147,9 @@ class QuarantineCache {
return 0;
QuarantineBatch *b = list_.front();
list_.pop_front();
- SizeAdd(-b->size);
+ // FIXME: should probably add SizeSub method?
+ // See https://code.google.com/p/thread-sanitizer/issues/detail?id=20
+ SizeAdd(0 - b->size);
return b;
}
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_thread_registry.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_thread_registry.cc?rev=182848&r1=182847&r2=182848&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_thread_registry.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_thread_registry.cc Wed May 29 07:03:49 2013
@@ -85,7 +85,7 @@ void ThreadContextBase::Reset() {
// ThreadRegistry implementation.
-const u32 ThreadRegistry::kUnknownTid = -1U;
+const u32 ThreadRegistry::kUnknownTid = ~0U;
ThreadRegistry::ThreadRegistry(ThreadContextFactory factory, u32 max_threads,
u32 thread_quarantine_size)
More information about the llvm-commits
mailing list