[sanitizer] fix a gcc warning

llvm-svn: 181992
This commit is contained in:
Kostya Serebryany 2013-05-16 08:03:26 +00:00
parent b7ca536888
commit 19eb46f4ca
1 changed files with 1 additions and 1 deletions

View File

@ -495,7 +495,7 @@ class SizeClassAllocator64 {
uptr offset = chunk % kRegionSize;
// Here we divide by a non-constant. This is costly.
// size always fits into 32-bits. If the offset fits too, use 32-bit div.
if (offset >> 32)
if (offset >> (SANITIZER_WORDSIZE / 2))
return offset / size;
return (u32)offset / (u32)size;
}