[SERVER-28908] Coverity analysis defect 100604: PW.USELESS_TYPE_QUALIFIER_ON_RETURN_TYPE Created: 21/Apr/17  Updated: 30/Oct/23  Resolved: 21/Apr/17

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Judah Schvimer
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
Participants:

 Description   

PW.USELESS_TYPE_QUALIFIER_ON_RETURN_TYPE

Defect 100604 (STATIC_C)
Checker PW.USELESS_TYPE_QUALIFIER_ON_RETURN_TYPE (subcategory none)
File: /src/mongo/db/repl/repl_set_config.cpp
Parse Warning (no function name available)
/src/mongo/db/repl/repl_set_config.cpp, line: 644
type qualifier on return type is meaningless

    const int ReplSetConfig::findMemberIndexByConfigId(long long configId) const {



 Comments   
Comment by Githook User [ 21/Apr/17 ]

Author:

{u'username': u'judahschvimer', u'name': u'Judah Schvimer', u'email': u'judah@mongodb.com'}

Message: SERVER-28908 Change ReplSetConfig return type from 'const int' to 'int'
Branch: master
https://github.com/mongodb/mongo/commit/49140247ca85644438e7394b6950f7687fbd4c91

Comment by Eric Milkie [ 21/Apr/17 ]

There are actually 4 defects flagged in this way, for const int ReplSetConfig::findMemberIndexByConfigId(long long configId) const and for const int ReplSetConfig::findMemberIndexByHostAndPort(const HostAndPort& hap) const (1 each in the .cpp and the declations in the .h file).

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