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

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 2.7.6
    • 2.7.7
    • Internal Client
    • None
    • Fully Compatible
    • 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

            tyler@10gen.com Tyler Brock
            tyler@10gen.com Tyler Brock
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: