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

Clang 3.5 reports error: 'this' pointer cannot be null in well defined C++

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.7.6
    • Fix Version/s: 2.7.7
    • Component/s: Internal Client
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL

      Description

      This actually is an error as clang reports it.

      In file included from src/mongo/client/dbclientinterface.h:1388:
      src/mongo/client/dbclientcursor.h:122:40: error: 'this' pointer cannot be null in well-defined C++ code; pointer may
            be assumed to always convert to true [-Werror,-Wundefined-bool-conversion]
              bool isDead() const { return  !this || cursorId == 0; }

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: