Changeset 225668 in webkit
- Timestamp:
- Dec 7, 2017 7:03:19 PM (6 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r225660 r225668 1 2017-12-07 Basuke Suzuki <Basuke.Suzuki@sony.com> 2 3 [Win] [64-bit] Resolve Microsoft warning C4319 on BitVector.cpp 4 https://bugs.webkit.org/show_bug.cgi?id=180490 5 6 Reviewed by Alex Christensen. 7 8 bitsInPointer() returns unsigned which is smaller than size_t. 9 "~"(negate) operator is applied before extending its size which result filled with zero. 10 This may be potentially a bug if numBits is greater than max value of unsigned long 11 (which is not practical). 12 13 * wtf/BitVector.cpp: 14 (WTF::BitVector::OutOfLineBits::create): 15 1 16 2017-12-07 Yusuke Suzuki <utatane.tea@gmail.com> 2 17 -
trunk/Source/WTF/wtf/BitVector.cpp
r173280 r225668 75 75 BitVector::OutOfLineBits* BitVector::OutOfLineBits::create(size_t numBits) 76 76 { 77 numBits = (numBits + bitsInPointer() - 1) & ~( bitsInPointer() - 1);77 numBits = (numBits + bitsInPointer() - 1) & ~(static_cast<size_t>(bitsInPointer()) - 1); 78 78 size_t size = sizeof(OutOfLineBits) + sizeof(uintptr_t) * (numBits / bitsInPointer()); 79 79 OutOfLineBits* result = new (NotNull, fastMalloc(size)) OutOfLineBits(numBits);
Note: See TracChangeset
for help on using the changeset viewer.