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

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.7.6
    • Fix Version/s: 2.7.7
    • Component/s: Testing Infrastructure
    • Labels:
      None
    • Environment:
      Linux (Clang 3.5)
    • Operating System:
      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

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: