Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-36573

Coverity analysis defect 104957: Copy without assign

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.1.3
    • Storage
    • Fully Compatible
    • ALL
    • Storage NYC 2018-08-13, Storage NYC 2018-08-27

    Description

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

      Defect 104957 (STATIC_C)
      Checker COPY_WITHOUT_ASSIGN (subcategory none)
      File: /src/mongo/db/storage/biggie/store.h
      Parse Warning (no function name available)
      /src/mongo/db/storage/biggie/store.h, line: 208
      Class "mongo::biggie::RadixStore<std::_cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::reverse_radix_iterator<std::pair<std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > const *, std::pair<std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > const &>" has a user-written copy constructor "mongo::biggie::RadixStore<std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::reverse_radix_iterator<std::pair<std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > const *, std::pair<std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > const &>::reverse_radix_iterator(mongo::biggie::RadixStore<std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::reverse_radix_iterator<std::pair<std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > const *, std::pair<std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::_cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > const &> const &)" but no corresponding user-written assignment operator.

              class reverse_radix_iterator {

      /src/mongo/db/storage/biggie/store.h, line: 246
      User-written copy constructor.

                  reverse_radix_iterator(const reverse_radix_iterator& other)

      Attachments

        Activity

          People

            dewal.gupta Dewal Gupta
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: