[SERVER-18528] Coverity analysis defect 72696: Logically dead code Created: 18/May/15  Updated: 18/May/15  Resolved: 18/May/15

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: J Rassi
Resolution: Won't Fix Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

Code can never be reached because of a logical contradiction

Defect 72696 (STATIC_C)
Checker DEADCODE (subcategory none)
File: /src/mongo/db/query/plan_cache.cpp
Function mongo::<unnamed>::encodeGeoNearMatchExpression(const mongo::GeoNearMatchExpression *, mongo::StringBuilderImpl<mongo::TrivialAllocator> *)
/src/mongo/db/query/plan_cache.cpp, line: 178
At condition "(bool)1L", the value of "1L" must be between 0 and 1.

                invariant(false);

/src/mongo/db/query/plan_cache.cpp, line: 178
The condition "(bool)1L" must be true.

                invariant(false);

/src/mongo/db/query/plan_cache.cpp, line: 179
Execution cannot reach this statement: "break;".

                break;


Generated at Thu Feb 08 03:47:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.