[SERVER-50552] Coverity analysis defect 116074: Unused value Created: 26/Aug/20  Updated: 27/Oct/23  Resolved: 10/May/23

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

Type: Bug Priority: Minor - P4
Reporter: Coverity Collector User Assignee: Backlog - Query Optimization
Resolution: Works as Designed Votes: 0
Labels: PM-1749-find-milestone, PM-1749-stability, coverity, coverity-pm-1854-tracking, qopt-team
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-49363 Triage Coverity Issues for Query code... Closed
Assigned Teams:
Query Optimization
Operating System: ALL
Participants:

 Description   

Unused value

An assigned value that is never used may represent unnecessary computation, an incorrect algorithm, or possibly the need for cleanup or refactoring. A value assigned to a variable is never used.
/src/mongo/db/cst/cst_pipeline_translation.cpp:664: UNUSED_VALUE 116074 Overwriting previous write to "*&<temporary>" with value from "mongo::cst_pipeline_translation::translateExpression(mongo::CNode const &, boost::intrusive_ptr<mongo::ExpressionContext> const &)::[lambda(mpark::variant<int, long long, double, mongo::Decimal128> const &) (instance 1)]()".
/src/mongo/db/cst/cst_pipeline_translation.cpp:655: UNUSED_VALUE 116074 Assigning value from "mongo::cst_pipeline_translation::translateExpression(mongo::CNode const &, boost::intrusive_ptr<mongo::ExpressionContext> const &)::[lambda(KeyValue const &) (instance 1)]()" to "*&<temporary>" here, but that stored value is overwritten before it can be used.


Generated at Thu Feb 08 05:22:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.