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

Coverity analysis defect 120085: Redundant test

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Gone away
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • ALL
    • Repl 2021-05-31, Repl 2021-06-14

    Description

      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/read_write_concern_defaults.cpp:251: DEADCODE 120085 At condition "isDefaultWCMajorityFeatureFlagEnabled", the value of "isDefaultWCMajorityFeatureFlagEnabled" must be equal to 1.
      /src/mongo/db/read_write_concern_defaults.cpp:242: DEADCODE 120085 Condition "isDefaultWCMajorityFeatureFlagEnabled", taking true branch. Now the value of "isDefaultWCMajorityFeatureFlagEnabled" is equal to 1.
      /src/mongo/db/read_write_concern_defaults.cpp:232: DEADCODE 120085 Condition "isDefaultWCMajorityFeatureFlagEnabled", taking true branch. Now the value of "isDefaultWCMajorityFeatureFlagEnabled" is equal to 1.
      /src/mongo/db/read_write_concern_defaults.cpp:229: DEADCODE 120085 Assigning: "isDefaultWCMajorityFeatureFlagEnabled" = "mongo::serverGlobalParams.featureCompatibility->isVersionInitialized() && mongo::repl::feature_flags::gDefaultWCMajority.isEnabled(mongo::serverGlobalParams.featureCompatibility)".
      /src/mongo/db/read_write_concern_defaults.cpp:251: DEADCODE 120085 The condition "isDefaultWCMajorityFeatureFlagEnabled" must be true.

      Attachments

        Activity

          People

            samy.lanka@mongodb.com Samyukta Lanka
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: