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"

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 2.7.6
    • 2.7.7
    • Testing Infrastructure
    • None
    • Linux (Clang 3.5)
    • ALL

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: