[SERVER-29330] Coverity analysis defect 101606: PW.PARAMETER_HIDDEN Created: 23/May/17  Updated: 27/Oct/23  Resolved: 11/Aug/17

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Esha Maharishi (Inactive)
Resolution: Gone away Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2017-08-21
Participants:

 Description   

PW.PARAMETER_HIDDEN

Defect 101606 (STATIC_C)
Checker PW.PARAMETER_HIDDEN (subcategory none)
File: /src/mongo/s/commands/cluster_aggregate.cpp
Parse Warning (no function name available)
/src/mongo/s/commands/cluster_aggregate.cpp, line: 295
declaration hides parameter "result" (declared at line 159)

            for (const auto& result : shardResults) {



 Comments   
Comment by Esha Maharishi (Inactive) [ 11/Aug/17 ]

The code in cluster_aggregate.cpp has been refactored so that the 'result' variable in the for loop does not shadow the BSONObjBuilder* result passed in to ClusterAggregate::runAggregate(), because the for-loop is now in its own helper method.

Generated at Thu Feb 08 04:20:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.