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

Coverity analysis defect 72775: Redundant test

    XMLWordPrintable

Details

    • Fully Compatible
    • ALL
    • Quint Iteration 7

    Description

      Test always evaluates the same

      Defect 72775 (STATIC_C)
      Checker DEADCODE (subcategory redundant_test)
      File: /src/mongo/db/exec/count.cpp
      Function mongo::CountStage::work(unsigned long *)
      /src/mongo/db/exec/count.cpp, line: 124
      Condition "mongo::PlanStage::IS_EOF == state", taking false branch. Now the value of "state" cannot be equal to 1.

                  if (PlanStage::IS_EOF == state) {
      

      /src/mongo/db/exec/count.cpp, line: 131
      Condition "mongo::PlanStage::FAILURE == state", taking false branch. Now the value of "state" cannot be equal to any of {1, 4, 5}.

                  else if (PlanStage::FAILURE == state || PlanStage::DEAD == state) {
      

      /src/mongo/db/exec/count.cpp, line: 128
      Condition "mongo::PlanStage::DEAD == state", taking false branch. Now the value of "state" cannot be equal to any of {1, 4}.

                  else if (PlanStage::DEAD == state) {
      

      /src/mongo/db/exec/count.cpp, line: 131
      At condition "mongo::PlanStage::DEAD == state", the value of "state" cannot be equal to any of {1, 4, 5}.

                  else if (PlanStage::FAILURE == state || PlanStage::DEAD == state) {
      

      /src/mongo/db/exec/count.cpp, line: 131
      The condition "mongo::PlanStage::DEAD == state" cannot be true.

                  else if (PlanStage::FAILURE == state || PlanStage::DEAD == state) {
      

      Attachments

        Activity

          People

            qingyang.chen Qingyang Chen
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: