In WebKit/JavaScriptCore/wtf/dtoa.cpp (r48248) on the trunk, we have: static void s2b(BigInt& b, const char* s, int nd0, int nd, uint32_t y9) { int k; int32_t y; int32_t x = (nd + 8) / 9; for (k = 0, y = 1; x > y; y <<= 1, k++) { } ... The local variables 'k' and 'y' are not used after the for loop, so the variables 'k' and 'y' and the for loop can be deleted. This is a cleanup of r43457. Also, the macro Kmax is defined but not used: #define Kmax 15 That definition can be deleted.
Re: Kmax When dtoa.cpp was moved to WebKit/JavaScriptCore/wtf in r38117, Kmax was already defined but not used. I didn't look further back in the history of dtoa.cpp.
Created attachment 65060 [details] dtoa.diff Wan-Teh is right... the 'x' variable can also be removed, since it's only used in the loop.
Comment on attachment 65060 [details] dtoa.diff Looks good.
Comment on attachment 65060 [details] dtoa.diff Landed as r66089.
Closing.