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++

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.7.7
    • Affects Version/s: 2.7.6
    • Component/s: Internal Client
    • Labels:
      None
    • Fully Compatible
    • ALL

      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; }
      

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

              Created:
              Updated:
              Resolved: