[compiler-rt] r182848 - Fix MSVC warnings at the -W2 level

David Blaikie dblaikie at gmail.com
Wed May 29 10:20:42 PDT 2013


On Wed, May 29, 2013 at 5:03 AM, Timur Iskhodzhanov <timurrrr at google.com>wrote:

> 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);
>

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...)


>      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)
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130529/5e6713a6/attachment.html>


More information about the llvm-commits mailing list