Coverity analysis defect 175141: Logically dead code

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Server Programmability
    • ALL
    • Programmability 2025-09-01
    • 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/base/parse_number.cpp:202: DEADCODE 175141 Assigning: "maxMagnitude" = "18446744073709551615UL + (isNegative ? 1U : 0U)".
      /src/mongo/base/parse_number.cpp:203: DEADCODE 175141 At condition "magnitude > maxMagnitude", the value of "maxMagnitude" must be equal to 18446744073709551615.
      /src/mongo/base/parse_number.cpp:203: DEADCODE 175141 The condition "magnitude > maxMagnitude" cannot be true.
      /src/mongo/base/parse_number.cpp:204: DEADCODE 175141 Execution cannot reach this statement: "<temporary>.Status(mongo::E...".

            Assignee:
            Billy Donahue
            Reporter:
            Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: