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

Coverity analysis defect 98181: Logically dead code

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 3.3.8
    • None
    • Security
    • None
    • Fully Compatible
    • ALL
    • Security 12 (04/01/16), Security 13 (04/22/16), Security 14 (05/13/16), Security 15 (06/03/16)

    Description

      Code can never be reached because of a logical contradiction

      Defect 98181 (STATIC_C)
      Checker DEADCODE (subcategory none)
      File: /src/mongo/db/modules/enterprise/src/ldap/connections/openldap_connection.cpp
      Function mongo::OpenLDAPConnection::connect()
      /src/mongo/db/modules/enterprise/src/ldap/connections/openldap_connection.cpp, line: 219
      The result of pointer arithmetic "++it" is never null.

                          if (++it == nullptr) {

      /src/mongo/db/modules/enterprise/src/ldap/connections/openldap_connection.cpp, line: 219
      At condition "+it == NULL", the value of "+it" cannot be "NULL".

                          if (++it == nullptr) {

      /src/mongo/db/modules/enterprise/src/ldap/connections/openldap_connection.cpp, line: 219
      The condition "++it == NULL" cannot be true.

                          if (++it == nullptr) {

      /src/mongo/db/modules/enterprise/src/ldap/connections/openldap_connection.cpp, line: 220
      Execution cannot reach this statement: "log << "], ";".

                              log << "], ";

      Attachments

        Activity

          People

            andreas.nilsson Andreas Nilsson
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: