Changeset 259588 in webkit
- Timestamp:
- Apr 6, 2020 1:07:45 PM (4 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r259587 r259588 1 2020-04-06 Fujii Hironori <Hironori.Fujii@sony.com> 2 3 [Clang 10] Fix -Wimplicit-int-float-conversion compilation warnings in JavaScriptCore 4 https://bugs.webkit.org/show_bug.cgi?id=210038 5 6 Reviewed by Darin Adler. 7 8 Clang 10 reports a compilation warning in JavaScriptCore: 9 > ..\..\Source\JavaScriptCore\bytecode/CodeBlock.cpp(3002,24): warning: implicit conversion from 'unsigned long long' to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Wimplicit-int-float-conversion] 10 > if (doubleResult > std::numeric_limits<size_t>::max()) 11 > ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 12 13 Use a template variable maxPlusOne<T> which was added by r259537 14 for the purpose. 15 16 * bytecode/CodeBlock.cpp: 17 (JSC::CodeBlock::predictedMachineCodeSize): Replaced '>' with '>=', 18 and std::numeric_limits<size_t>::max() with maxPlusOne<size_t>. 19 1 20 2020-04-06 Rick Waldron <waldron.rick@gmail.com> and Alexey Shvayka <shvaikalesh@gmail.com> 2 21 -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
r259583 r259588 3002 3002 // should probably have some other guards in place to prevent us from even getting 3003 3003 // to this point. 3004 if (doubleResult > std::numeric_limits<size_t>::max())3004 if (doubleResult >= maxPlusOne<size_t>) 3005 3005 return 0; 3006 3006
Note: See TracChangeset
for help on using the changeset viewer.