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

Clang 3.5 reports error: "reference cannot be bound to dereferenced null pointer"

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.7.7
    • Affects Version/s: 2.7.6
    • Component/s: Testing Infrastructure
    • None
    • Environment:
      Linux (Clang 3.5)
    • ALL

      src/mongo/dbtests/perftests.cpp:752:18: error: reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true
            [-Werror,-Wundefined-bool-conversion]
                  if( &cc() )
                  ~~   ^~~~
      src/mongo/db/client.h:217:20: note: 'cc' returns a reference
          inline Client& cc() {
                         ^
      1 error generated.
      

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

              Created:
              Updated:
              Resolved: