Coverity analysis defect 170240: Unused value

XMLWordPrintableJSON

    • Query Integration
    • ALL
    • None
    • 3
    • 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/pipeline/window_function/window_bounds.cpp:72: UNUSED_VALUE 170240 Overwriting previous write to "*<temporary>" with value from "mongo::Value mongo::<unnamed>::serializeBound<int>(mpark::variant<mongo::WindowBounds::Unbounded, mongo::WindowBounds::Current, int> const &, mongo::SerializationOptions const &, mongo::Value const &)::[lambda(mongo::WindowBounds::Current const &) (instance 1)]()".
      /src/mongo/db/pipeline/window_function/window_bounds.cpp:71: UNUSED_VALUE 170240 Assigning value from "mongo::Value mongo::<unnamed>::serializeBound<int>(mpark::variant<mongo::WindowBounds::Unbounded, mongo::WindowBounds::Current, int> const &, mongo::SerializationOptions const &, mongo::Value const &)::[lambda(mongo::WindowBounds::Unbounded const &) (instance 1)]()" to "*<temporary>" here, but that stored value is overwritten before it can be used.

            Assignee:
            Kyle Suarez (Inactive)
            Reporter:
            Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: