[SERVER-38336] Coverity analysis defect 105145: Copy without assign Created: 30/Nov/18  Updated: 29/Oct/23  Resolved: 04/Dec/18

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Louis Williams
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: Storage NYC 2018-12-17
Participants:
Story Points: 1

 Description   

Class has user-written copy constructor but no user-written assignment operator

Defect 105145 (STATIC_C)
Checker COPY_WITHOUT_ASSIGN (subcategory none)
File: /src/mongo/db/storage/kv/temporary_kv_record_store.h
Parse Warning (no function name available)
/src/mongo/db/storage/kv/temporary_kv_record_store.h, line: 46
Class "mongo::TemporaryKVRecordStore" has a user-written copy constructor "mongo::TemporaryKVRecordStore::TemporaryKVRecordStore(mongo::TemporaryKVRecordStore &&)" but no corresponding user-written assignment operator.

    class TemporaryKVRecordStore : public TemporaryRecordStore {

/src/mongo/db/storage/kv/temporary_kv_record_store.h, line: 54
User-written copy constructor.

        TemporaryKVRecordStore(TemporaryKVRecordStore&& other) noexcept



 Comments   
Comment by Githook User [ 04/Dec/18 ]

Author:

{'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}

Message: SERVER-38336 Explicitly delete copy constructor and assignment operator for TemporaryKVRecordStore
Branch: master
https://github.com/mongodb/mongo/commit/7bdcbbe7eb1c4ee8fcfe69f633d8056659bccaff

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