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

Coverity analysis defect 115277: Redundant test

    • Fully Compatible
    • Repl 2022-06-13, Repl 2022-06-27

      Redundant test

      By the time the program execution reaches the test of this condition there is only one possible outcome for the test. The code at the destination of this branch is not dead, either because this condition is always true or because there is at least one other branch that reaches it. Test always evaluates the same
      /src/mongo/db/repl/replication_coordinator_impl.cpp:3952: DEADCODE 115277 At condition "newIndex >= 0", the value of "newIndex" must be at least 0.
      /src/mongo/db/repl/replication_coordinator_impl.cpp:3933: DEADCODE 115277 Condition "newIndex < 0", taking false branch. Now the value of "newIndex" is at least 0.
      /src/mongo/db/repl/replication_coordinator_impl.cpp:3952: DEADCODE 115277 The condition "newIndex >= 0" must be true.

            Assignee:
            evelyn.wu@mongodb.com Evelyn Wu
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: