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

Coverity analysis defect 73173: Logically dead code

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1.8
    • Component/s: Security
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Security 9 (09/18/15)

      Description

      Code can never be reached because of a logical contradiction

      Defect 73173 (STATIC_C)
      Checker DEADCODE (subcategory none)
      File: /src/mongo/db/modules/enterprise/src/sasl/auxprop_mongodb_internal.cpp
      Function mongo::<unnamed>::auxpropLookupMongoDBInternal(void *, sasl_server_params *, unsigned int, const char *, unsigned int)
      /src/mongo/db/modules/enterprise/src/sasl/auxprop_mongodb_internal.cpp, line: 166
      Assigning: "curRet" = "-20".

                      curRet = SASL_NOUSER;

      /src/mongo/db/modules/enterprise/src/sasl/auxprop_mongodb_internal.cpp, line: 182
      At condition "curRet != -20", the value of "curRet" must be equal to -20.

                  if (curRet != SASL_OK && curRet != SASL_NOUSER) {

      /src/mongo/db/modules/enterprise/src/sasl/auxprop_mongodb_internal.cpp, line: 182
      The condition "curRet != -20" cannot be true.

                  if (curRet != SASL_OK && curRet != SASL_NOUSER) {

      /src/mongo/db/modules/enterprise/src/sasl/auxprop_mongodb_internal.cpp, line: 183
      Execution cannot reach this statement: "break;".

                      break;

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: