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

Coverity analysis defect 120812: Redundant test

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 5.1.0-rc3
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Fully Compatible
    • ALL
    • Execution Team 2021-10-04, Execution Team 2021-10-18, Execution Team 2021-11-01, Execution Team 2021-11-15

      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/bson/bsonelement.h:1061: DEADCODE 120812 At condition "sameMax", the value of "sameMax" must be equal to 1.
      /src/mongo/bson/bsonelement.h:1060: DEADCODE 120812 Condition "sameMax", taking true branch. Now the value of "sameMax" is equal to 1.
      /src/mongo/bson/bsonelement.h:1059: DEADCODE 120812 Assigning: "sameMax" = "true".
      /src/mongo/bson/bsonelement.h:1060: DEADCODE 120812 The condition "sameMax" must be true.

            Assignee:
            gabriel.marks@mongodb.com Gabriel Marks
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: