Coverity analysis defect 128615: 'Constant' variable guards dead code

XMLWordPrintableJSON

    • Fully Compatible
    • ALL
    • QO 2022-08-22
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      'Constant' variable guards dead code

      A variable being assigned only once may be intentionally guarding disabled code, or it may represent incomplete logic where a missing assignment would make the variable not be constant. Variable assigned once to a constant guards dead code.
      /src/mongo/db/query/optimizer/utils/utils.cpp:1049: DEADCODE 128615 Assigning: "indexSuitable" = "true".
      /src/mongo/db/query/optimizer/utils/utils.cpp:1153: DEADCODE 128615 At condition "indexSuitable", the value of "indexSuitable" must be equal to 1.
      /src/mongo/db/query/optimizer/utils/utils.cpp:1153: DEADCODE 128615 The condition "!indexSuitable" cannot be true.
      /src/mongo/db/query/optimizer/utils/utils.cpp:1154: DEADCODE 128615 Execution cannot reach this statement: "continue;".

            Assignee:
            Svilen Mihaylov (Inactive)
            Reporter:
            Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: