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

Coverity analysis defect 105104: Uninitialized scalar field

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Gone away
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Storage
    • Labels:
    • Operating System:
      ALL

      Description

      A scalar field is not initialized by the constructor

      Defect 105104 (STATIC_C)
      Checker UNINIT_CTOR (subcategory none)
      File: /src/mongo/db/sorter/sorter.cpp
      Function mongo::SortedFileWriter<mongo::Value, mongo::Value>::SortedFileWriter(const mongo::SortOptions &, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> &, unsigned int, const std::pair<mongo::Value::SorterDeserializeSettings, mongo::Value::SorterDeserializeSettings> &)
      /src/mongo/db/sorter/sorter.h, line: 266
      Class member declaration for "_fileEndOffset".

              unsigned int _fileEndOffset;

      /src/mongo/db/sorter/sorter.cpp, line: 929
      Non-static class member "_fileEndOffset" is not initialized in this constructor nor in any functions that it calls.

          }

      File: /src/mongo/db/sorter/sorter.cpp
      Function mongo::SortedFileWriter<mongo::Value, mongo::Document>::SortedFileWriter(const mongo::SortOptions &, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> &, unsigned int, const std::pair<mongo::Value::SorterDeserializeSettings, mongo::Document::SorterDeserializeSettings> &)
      /src/mongo/db/sorter/sorter.h, line: 266
      Class member declaration for "_fileEndOffset".

              unsigned int _fileEndOffset;

      /src/mongo/db/sorter/sorter.cpp, line: 929
      Non-static class member "_fileEndOffset" is not initialized in this constructor nor in any functions that it calls.

          }

      File: /src/mongo/db/sorter/sorter.cpp
      Function mongo::SortedFileWriter<mongo::BSONObj, mongo::RecordId>::SortedFileWriter(const mongo::SortOptions &, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> &, unsigned int, const std::pair<mongo::BSONObj::SorterDeserializeSettings, mongo::RecordId::SorterDeserializeSettings> &)
      /src/mongo/db/sorter/sorter.h, line: 266
      Class member declaration for "_fileEndOffset".

              unsigned int _fileEndOffset;

      /src/mongo/db/sorter/sorter.cpp, line: 929
      Non-static class member "_fileEndOffset" is not initialized in this constructor nor in any functions that it calls.

          }

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: