[compiler-rt] r204139 - Fix -Werror build

Alexey Samsonov samsonov at google.com
Tue Mar 18 04:17:02 PDT 2014


Author: samsonov
Date: Tue Mar 18 06:17:01 2014
New Revision: 204139

URL: http://llvm.org/viewvc/llvm-project?rev=204139&view=rev
Log:
Fix -Werror build

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_addrhashmap.h

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_addrhashmap.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_addrhashmap.h?rev=204139&r1=204138&r2=204139&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_addrhashmap.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_addrhashmap.h Tue Mar 18 06:17:01 2014
@@ -133,7 +133,7 @@ void AddrHashMap<T, kSize>::acquire(Hand
   Bucket *b = &table_[hash];
 
   h->created_ = false;
-  h->addidx_ = -1;
+  h->addidx_ = -1U;
   h->bucket_ = b;
   h->cell_ = 0;
 
@@ -272,7 +272,7 @@ void AddrHashMap<T, kSize>::release(Hand
     atomic_store(&c->addr, 0, memory_order_release);
     // See if we need to compact the bucket.
     AddBucket *add = (AddBucket*)atomic_load(&b->add, memory_order_relaxed);
-    if (h->addidx_ == -1) {
+    if (h->addidx_ == -1U) {
       // Removed from embed array, move an add element into the freed cell.
       if (add) {
         uptr last = --add->size;
@@ -293,7 +293,7 @@ void AddrHashMap<T, kSize>::release(Hand
     b->mtx.Unlock();
   } else {
     CHECK_EQ(addr1, h->addr_);
-    if (h->addidx_ != -1)
+    if (h->addidx_ != -1U)
       b->mtx.ReadUnlock();
   }
 }





More information about the llvm-commits mailing list