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

Coverity analysis defect 72696: Logically dead code

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Testing Infrastructure
    • Fully Compatible
    • ALL

    Description

      Code can never be reached because of a logical contradiction

      Defect 72696 (STATIC_C)
      Checker DEADCODE (subcategory none)
      File: /src/mongo/db/query/plan_cache.cpp
      Function mongo::<unnamed>::encodeGeoNearMatchExpression(const mongo::GeoNearMatchExpression *, mongo::StringBuilderImpl<mongo::TrivialAllocator> *)
      /src/mongo/db/query/plan_cache.cpp, line: 178
      At condition "(bool)1L", the value of "1L" must be between 0 and 1.

                      invariant(false);

      /src/mongo/db/query/plan_cache.cpp, line: 178
      The condition "(bool)1L" must be true.

                      invariant(false);

      /src/mongo/db/query/plan_cache.cpp, line: 179
      Execution cannot reach this statement: "break;".

                      break;

      Attachments

        Activity

          People

            rassi J Rassi
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: