Skip to content

Commit ac1b55c

Browse files
committed
Fixup cmake errors/warnings
1 parent 1c4763b commit ac1b55c

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/lib_json/json_reader.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,7 +1561,7 @@ bool OurReader::decodeNumber(Token& token, Value& decoded) {
15611561

15621562
const Value::LargestUInt threshold =
15631563
isNegative ? negative_threshold : positive_threshold;
1564-
const Value::UInt last_digit =
1564+
const Value::UInt max_last_digit =
15651565
isNegative ? negative_last_digit : positive_last_digit;
15661566

15671567
Value::LargestUInt value = 0;
@@ -1577,7 +1577,7 @@ bool OurReader::decodeNumber(Token& token, Value& decoded) {
15771577
// b) this is the last digit, or
15781578
// c) it's small enough to fit in that rounding delta, we're okay.
15791579
// Otherwise treat this number as a double to avoid overflow.
1580-
if (value > threshold || current != token.end_ || digit > last_digit) {
1580+
if (value > threshold || current != token.end_ || digit > max_last_digit) {
15811581
return decodeDouble(token, decoded);
15821582
}
15831583
}
@@ -1586,7 +1586,7 @@ bool OurReader::decodeNumber(Token& token, Value& decoded) {
15861586

15871587
if (isNegative) {
15881588
// We use the same magnitude assumption here, just in case.
1589-
const Value::UInt last_digit = value % 10;
1589+
const Value::UInt last_digit = static_cast<Value::UInt>(value % 10);
15901590
decoded = -Value::LargestInt(value / 10) * 10 - last_digit;
15911591
} else if (value <= Value::LargestUInt(Value::maxLargestInt)) {
15921592
decoded = Value::LargestInt(value);

src/test_lib_json/main.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2258,7 +2258,6 @@ JSONTEST_FIXTURE_LOCAL(StyledStreamWriterTest, multiLineArray) {
22582258
"\n\t18,"
22592259
"\n\t19,"
22602260
"\n\t20\n]\n");
2261-
Json::StyledStreamWriter writer;
22622261
Json::Value root;
22632262
for (int i = 0; i < 21; i++)
22642263
root[i] = i;

0 commit comments

Comments
 (0)