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

XMLWordPrintableJSON

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

      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 Brock (Inactive)
              Reporter:
              Tyler Brock (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: