Skip to content

Commit 6cd5cd7

Browse files
committed
[Debug - Initialize variable]
1 parent 292f787 commit 6cd5cd7

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

include/rapidjson/internal/strtod.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,13 @@ inline bool StrtodDiyFp(const char* decimals, int dLen, int dExp, double* result
155155
DiyFp cachedPower = GetCachedPower10(dExp, &actualExp);
156156
if (actualExp != dExp) {
157157
static const DiyFp kPow10[] = {
158-
DiyFp(RAPIDJSON_UINT64_C2(0xa0000000, 00000000), -60), // 10^1
159-
DiyFp(RAPIDJSON_UINT64_C2(0xc8000000, 00000000), -57), // 10^2
160-
DiyFp(RAPIDJSON_UINT64_C2(0xfa000000, 00000000), -54), // 10^3
161-
DiyFp(RAPIDJSON_UINT64_C2(0x9c400000, 00000000), -50), // 10^4
162-
DiyFp(RAPIDJSON_UINT64_C2(0xc3500000, 00000000), -47), // 10^5
163-
DiyFp(RAPIDJSON_UINT64_C2(0xf4240000, 00000000), -44), // 10^6
164-
DiyFp(RAPIDJSON_UINT64_C2(0x98968000, 00000000), -40) // 10^7
158+
DiyFp(RAPIDJSON_UINT64_C2(0xa0000000, 0x00000000), -60), // 10^1
159+
DiyFp(RAPIDJSON_UINT64_C2(0xc8000000, 0x00000000), -57), // 10^2
160+
DiyFp(RAPIDJSON_UINT64_C2(0xfa000000, 0x00000000), -54), // 10^3
161+
DiyFp(RAPIDJSON_UINT64_C2(0x9c400000, 0x00000000), -50), // 10^4
162+
DiyFp(RAPIDJSON_UINT64_C2(0xc3500000, 0x00000000), -47), // 10^5
163+
DiyFp(RAPIDJSON_UINT64_C2(0xf4240000, 0x00000000), -44), // 10^6
164+
DiyFp(RAPIDJSON_UINT64_C2(0x98968000, 0x00000000), -40) // 10^7
165165
};
166166
int adjustment = dExp - actualExp;
167167
RAPIDJSON_ASSERT(adjustment >= 1 && adjustment < 8);
@@ -204,9 +204,9 @@ inline bool StrtodDiyFp(const char* decimals, int dLen, int dExp, double* result
204204
return halfWay - static_cast<unsigned>(error) >= precisionBits || precisionBits >= halfWay + static_cast<unsigned>(error);
205205
}
206206

207-
inline double StrtodBigInteger(double approx, const char* decimals, int length, int dExp) {
208-
RAPIDJSON_ASSERT(length >= 0);
209-
const BigInteger dInt(decimals, static_cast<unsigned>(length));
207+
inline double StrtodBigInteger(double approx, const char* decimals, int dLen, int dExp) {
208+
RAPIDJSON_ASSERT(dLen >= 0);
209+
const BigInteger dInt(decimals, static_cast<unsigned>(dLen));
210210
Double a(approx);
211211
int cmp = CheckWithinHalfULP(a.Value(), dInt, dExp);
212212
if (cmp < 0)
@@ -226,7 +226,7 @@ inline double StrtodFullPrecision(double d, int p, const char* decimals, size_t
226226
RAPIDJSON_ASSERT(d >= 0.0);
227227
RAPIDJSON_ASSERT(length >= 1);
228228

229-
double result;
229+
double result = 0.0;
230230
if (StrtodFast(d, p, &result))
231231
return result;
232232

0 commit comments

Comments
 (0)