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

Coverity analysis defect 122327: Redundant test

    • Fully Compatible
    • v6.0, v5.0
    • QO 2022-06-13, QO 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/pipeline/pipeline_d.cpp:1186: DEADCODE 122327 At condition "mps", the value of "mps" cannot be "nullptr".
      /src/mongo/db/pipeline/pipeline_d.cpp:1186: DEADCODE 122327 Assigning: "mps" = "static_cast<mongo::MultiPlanStage *>(rootStage)".
      /src/mongo/db/pipeline/pipeline_d.cpp:1175: DEADCODE 122327 Condition "rootStage", taking true branch. Now the value of "rootStage" is not "nullptr".
      /src/mongo/db/pipeline/pipeline_d.cpp:1186: DEADCODE 122327 The condition "mps" must be true.

            Assignee:
            daniel.segel@mongodb.com Daniel Segel
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: