Coverity analysis defect 183903: Logically dead code

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • Fully Compatible
    • ALL
    • QE 2025-12-08
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Logically dead code

      The indicated dead code may have performed some action; that action will never occur. Code can never be reached because of a logical contradiction
      /src/mongo/db/exec/sbe/stages/scan.cpp:195: DEADCODE 183903 Assigning: "first" = "true".
      /src/mongo/db/exec/sbe/stages/scan.cpp:198: DEADCODE 183903 At condition "first", the value of "first" must be equal to 1.
      /src/mongo/db/exec/sbe/stages/scan.cpp:198: DEADCODE 183903 The condition "!first" cannot be true.
      /src/mongo/db/exec/sbe/stages/scan.cpp:199: DEADCODE 183903 Execution cannot reach the expression "ret->emplace_back(mongo::sbe::DebugPrinter::Block(mongo::StringData("`,")))" inside this statement: "ret->emplace_back(mongo::sb...".

            Assignee:
            Niels Lohmann
            Reporter:
            Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: