Coverity analysis defect 116001: Unused value

XMLWordPrintableJSON

    • Query Optimization
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Unused value

      An assigned value that is never used may represent unnecessary computation, an incorrect algorithm, or possibly the need for cleanup or refactoring. A value assigned to a variable is never used.
      /src/mongo/db/cst/cst_pipeline_translation.cpp:105: UNUSED_VALUE 116001 Overwriting previous write to "*&<temporary>" with value from "mongo::cst_pipeline_translation::<unnamed>::translateLiteralToValue(mongo::CNode const &)::[lambda(std::vector<std::pair<mpark::variant<KeyFieldname, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, mongo::CNode>, std::allocator<std::pair<mpark::variant<KeyFieldname, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, mongo::CNode> > > const &) (instance 1)]()".
      /src/mongo/db/cst/cst_pipeline_translation.cpp:104: UNUSED_VALUE 116001 Assigning value from "mongo::cst_pipeline_translation::<unnamed>::translateLiteralToValue(mongo::CNode const &)::[lambda(std::vector<mongo::CNode, std::allocator<mongo::CNode> > const &) (instance 1)]()" to "*&<temporary>" here, but that stored value is overwritten before it can be used.

              Assignee:
              [DO NOT USE] Backlog - Query Optimization
              Reporter:
              Coverity Collector User
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: