[compiler-rt] 1b0436c - [scudo] Silent warning for u64 -> u32 convertion

via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 18 13:02:18 PDT 2020


Author: kpdev
Date: 2020-04-17T09:29:55+03:00
New Revision: 1b0436cd4b7ebac7de33c5ede7b3509c811cc7e1

URL: https://github.com/llvm/llvm-project/commit/1b0436cd4b7ebac7de33c5ede7b3509c811cc7e1
DIFF: https://github.com/llvm/llvm-project/commit/1b0436cd4b7ebac7de33c5ede7b3509c811cc7e1.diff

LOG: [scudo] Silent warning for u64 -> u32 convertion

Error is raised because of using -Werror=convertion

Added: 
    

Modified: 
    compiler-rt/lib/scudo/standalone/stack_depot.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/scudo/standalone/stack_depot.h b/compiler-rt/lib/scudo/standalone/stack_depot.h
index c4d9b277a1c5..f2f4d9597795 100644
--- a/compiler-rt/lib/scudo/standalone/stack_depot.h
+++ b/compiler-rt/lib/scudo/standalone/stack_depot.h
@@ -121,7 +121,7 @@ class StackDepot {
     u64 HashWithTagBit = (u64(Hash) << 1) | 1;
     if ((Entry & 0x1ffffffff) != HashWithTagBit)
       return false;
-    u32 Size = Entry >> 33;
+    u32 Size = u32(Entry >> 33);
     if (Size >= RingSize)
       return false;
     *RingPosPtr = (RingPos + 1) & RingMask;


        


More information about the llvm-commits mailing list