Coverity analysis defect 73571: Unsafe assignment operator

XMLWordPrintableJSON

    • Fully Compatible
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Assignment operator does not check for self-assignment

      Defect 73571 (STATIC_C)
      Checker SELF_ASSIGN (subcategory none)
      File: /src/mongo/s/query/cluster_cursor_manager.cpp
      Function mongo::ClusterCursorManager::PinnedCursor::operator =(mongo::ClusterCursorManager::PinnedCursor&&)
      /src/mongo/s/query/cluster_cursor_manager.cpp, line: 101
      No protection against the object assigning to itself.

              _manager = std::move(other._manager);
      

            Assignee:
            Unassigned
            Reporter:
            Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: