Summary: | Fix build warning in bignum.cc | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Csaba Osztrogonác <ossy> | ||||||||
Component: | New Bugs | Assignee: | Csaba Osztrogonác <ossy> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | benjamin, cdumez, cmarcelo, commit-queue, jh718.park, ossy | ||||||||
Priority: | P2 | ||||||||||
Version: | Other | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 150619 | ||||||||||
Attachments: |
|
Description
Csaba Osztrogonác
2015-11-02 05:49:18 PST
It is already fixed in V8: https://github.com/v8/v8/commit/e28183b5977a2d2732f7f8b9a2f26637c9566585 Created attachment 264578 [details]
Patch
It's not the best fix, because it suppresses this warning. But from and digits_to_read are small numbers, it is unlikely to reach overflow in a real life use case.
Created attachment 264579 [details]
Patch
typo fixed
Comment on attachment 264579 [details]
Patch
r=me
Comment on attachment 264579 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=264579&action=review > Source/WTF/wtf/dtoa/bignum.cc:98 > - for (int i = from; i < from + digits_to_read; ++i) { > + int to = from + digits_to_read; > + for (int i = from; i < to; ++i) { > int digit = buffer[i] - '0'; Instead of just quieting the warning I would have suggested: for (int i = 0; i <digits_to_read; ++i) { int digit = buffer[from + i] - '0'; Seems slightly more in the spirit of the warning. *** Bug 151553 has been marked as a duplicate of this bug. *** Created attachment 266198 [details]
Patch for landing
Comment on attachment 266198 [details] Patch for landing Clearing flags on attachment: 266198 Committed r192779: <http://trac.webkit.org/changeset/192779> All reviewed patches have been landed. Closing bug. |