Coverity analysis defect 174786: Redundant test

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • Fully Compatible
    • ALL
    • QE 2025-06-23
    • 200
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None

      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
      /data/mci/58fd14856d2dbbbec49d65ec6a1b6796/bazel_cache/33d18d311b7c0cb8812477a320550d4d/execroot/_main/src/mongo/s/write_ops/write_op.cpp:294: DEADCODE 174786 At condition "writeType == mongo::WriteType::Ordinary", the value of "writeType" must be equal to 0.
      /data/mci/58fd14856d2dbbbec49d65ec6a1b6796/bazel_cache/33d18d311b7c0cb8812477a320550d4d/execroot/_main/src/mongo/s/write_ops/write_op.cpp:264: DEADCODE 174786 Condition "writeType == mongo::WriteType::Ordinary", taking true branch. Now the value of "writeType" is equal to 0.
      /data/mci/58fd14856d2dbbbec49d65ec6a1b6796/bazel_cache/33d18d311b7c0cb8812477a320550d4d/execroot/_main/src/mongo/s/write_ops/write_op.cpp:294: DEADCODE 174786 The condition "writeType == mongo::WriteType::Ordinary" must be true.

            Assignee:
            Drew Paroski
            Reporter:
            Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: