[SERVER-34474] Coverity analysis defect 103494: Self assignment Created: 13/Apr/18  Updated: 29/Oct/23  Resolved: 23/Apr/18

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 4.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Mark Benvenuto
Resolution: Fixed Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platforms 2018-05-07
Participants:

 Description   

Assignment of a variable or expression to itself has no effect

Defect 103494 (STATIC_C)
Checker NO_EFFECT (subcategory self_assign)
File: /src/mongo/db/free_mon/free_mon_processor.cpp
Function mongo::RegistrationRetryCounter::incrementError()
/src/mongo/db/free_mon/free_mon_processor.cpp, line: 83
Assigning "this->_base" to itself has no effect.

            _base = _base;



 Comments   
Comment by Mark Benvenuto [ 23/Apr/18 ]

Fixed with https://github.com/mongodb/mongo/commit/70e47745a78fffcc20b70f8e09a8b80a2b62e3bf

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