[SERVER-50234] Coverity analysis defect 114418: Unused value Created: 10/Aug/20  Updated: 29/Oct/23  Resolved: 02/Sep/20

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Vishnu Kaushik
Resolution: Fixed Votes: 0
Labels: coverity, neweng, newgrad
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2020-09-07
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/storage/key_string.cpp:2439: UNUSED_VALUE 114418 Overwriting previous write to "ctype" with value from "mongo::KeyString::<unnamed>::readType(&reader, false)".
/src/mongo/db/storage/key_string.cpp:2438: UNUSED_VALUE 114418 Assigning value from "~ctype" to "ctype" here, but that stored value is overwritten before it can be used.



 Comments   
Comment by Githook User [ 02/Sep/20 ]

Author:

{'name': 'Vishnu Kaushik', 'email': 'vishnu.kaushik@mongodb.com', 'username': 'kauboy26'}

Message: SERVER-50234 delete the unused function toBsonWithSafeDiscriminator
Branch: master
https://github.com/mongodb/mongo/commit/9ede1ee4cca29667ec90e8e3cdcfd5399a3fd303

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