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

Coverity analysis defect 122748: Logically dead code

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor - P4 Minor - P4
    • 6.2.0-rc0
    • None
    • None
    • Fully Compatible
    • QE 2022-09-19

    Description

      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/query/sbe_stage_builder_expression.cpp:1413: DEADCODE 122748 Condition "eIsoWeekYear.operator bool()", taking true branch. Now the value of "eIsoWeekYear" is not "nullptr".
      /src/mongo/db/query/sbe_stage_builder_expression.cpp:1520: DEADCODE 122748 At condition "eIsoWeekYear.operator bool()", the value of "eIsoWeekYear" cannot be "nullptr".
      /src/mongo/db/query/sbe_stage_builder_expression.cpp:1520: DEADCODE 122748 The condition "!eIsoWeekYear.operator bool()" cannot be true.
      /src/mongo/db/query/sbe_stage_builder_expression.cpp:1521: DEADCODE 122748 Execution cannot reach the expression "(eIsoWeekYear) = (std::unique_ptr<mongo::sbe::EExpression, std::default_delete<mongo::sbe::EExpression> >(mongo::sbe::makeE(mongo::sbe::value::TypeTags(mongo::sbe::value::TypeTags::NumberInt32), mongo::sbe::value::Value(mongo::sbe::value::bitcastFrom(1970)))))" inside this statement: "(eIsoWeekYear) = (std::uniq...".

      Attachments

        Activity

          People

            mindaugas.malinauskas@mongodb.com Mindaugas Malinauskas
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: