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

Coverity analysis defect 72778: Logically dead code

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Trivial - P5 Trivial - P5
    • None
    • Affects Version/s: None
    • Component/s: Testing Infrastructure
    • Fully Compatible
    • ALL
    • Sharding A (10/09/15)
    • None
    • 0
    • None
    • None
    • None
    • None
    • None
    • None

      Code can never be reached because of a logical contradiction

      Defect 72778 (STATIC_C)
      Checker DEADCODE (subcategory none)
      File: /src/mongo/s/version_manager.cpp
      Function mongo::checkShardVersion(mongo::DBClientBase *, const std::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<mongo::ChunkManager>, bool, int)
      /src/mongo/s/version_manager.cpp, line: 436
      At condition "(bool)1L", the value of "1L" must be between 0 and 1.

                  massert( 10429 , errmsg , 0 );
      

      /src/mongo/s/version_manager.cpp, line: 436
      The condition "(bool)1L" must be true.

                  massert( 10429 , errmsg , 0 );
      

      /src/mongo/s/version_manager.cpp, line: 437
      Execution cannot reach this statement: "return true;".

                  return true;
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: