diff options
author | Billy Donahue <billy.donahue@mongodb.com> | 2022-07-19 16:45:52 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-07-19 17:14:34 +0000 |
commit | d36795e47dadb8c324baeef692646232bff1f7c9 (patch) | |
tree | 0a549fca6ca3af9c003eb5f16615613d571ebc29 /src/mongo/db/storage | |
parent | 24d4538ef2c52ae81455849ca37b40ed51fcc38c (diff) | |
download | mongo-d36795e47dadb8c324baeef692646232bff1f7c9.tar.gz |
SERVER-68123 Handle unused-but-set-variable warnings
Diffstat (limited to 'src/mongo/db/storage')
-rw-r--r-- | src/mongo/db/storage/key_string.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/mongo/db/storage/key_string.cpp b/src/mongo/db/storage/key_string.cpp index 0ba7f9c35af..1bb0ce8ac52 100644 --- a/src/mongo/db/storage/key_string.cpp +++ b/src/mongo/db/storage/key_string.cpp @@ -2000,10 +2000,6 @@ void readBson(BufReader* reader, bool inverted, Version version) { } void filterKeyFromKeyString(uint8_t ctype, BufReader* reader, bool inverted, Version version) { - // This is only used by the kNumeric.*ByteInt types, but needs to be declared up here - // since it is used across a fallthrough. - bool isNegative = false; - switch (ctype) { case CType::kMinKey: case CType::kMaxKey: @@ -2106,7 +2102,6 @@ void filterKeyFromKeyString(uint8_t ctype, BufReader* reader, bool inverted, Ver case CType::kNumericNegativeLargeMagnitude: inverted = !inverted; - isNegative = true; [[fallthrough]]; // format is the same as positive, but inverted case CType::kNumericPositiveLargeMagnitude: { uint64_t encoded = readType<uint64_t>(reader, inverted); @@ -2132,7 +2127,6 @@ void filterKeyFromKeyString(uint8_t ctype, BufReader* reader, bool inverted, Ver case CType::kNumericNegativeSmallMagnitude: inverted = !inverted; - isNegative = true; [[fallthrough]]; // format is the same as positive, but inverted case CType::kNumericPositiveSmallMagnitude: { @@ -2194,7 +2188,6 @@ void filterKeyFromKeyString(uint8_t ctype, BufReader* reader, bool inverted, Ver case CType::kNumericNegative2ByteInt: case CType::kNumericNegative1ByteInt: inverted = !inverted; - isNegative = true; [[fallthrough]]; // format is the same as positive, but inverted case CType::kNumericPositive1ByteInt: |