Skip to content

Commit

Permalink
Coverity May 2024 (#5497)
Browse files Browse the repository at this point in the history
* Fix use after move
* Initilize the OpType
---------

Signed-off-by: Kamil Tokarski <[email protected]>
  • Loading branch information
stiepan committed Jun 5, 2024
1 parent ea2eff0 commit 750b90e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dali/pipeline/graph/op_graph2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ void OpGraph::Builder::Add(std::string instance_name, OpSpec new_spec) {
throw std::invalid_argument(make_string(
"The data node \"", name, "\" has more than one producer:"
"\n 1: ", node->producer.op->instance_name, ", output ", node->producer.idx,
"\n 2: ", instance_name, ", output ", o));
"\n 2: ", op_node.instance_name, ", output ", o));
}
} else {
auto dev = ParseStorageDevice(spec.OutputDevice(o));
Expand Down
2 changes: 1 addition & 1 deletion dali/pipeline/graph/op_graph2.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ struct OpNode {
/** The specification of an operator. */
OpSpec spec;
/** The "device" - cpu, gpu or mixed. */
OpType op_type;
OpType op_type = OpType::CPU; // TODO(michalz): initialize it properly

/** This node must not be pruned. */
bool keep = false;
Expand Down

0 comments on commit 750b90e

Please sign in to comment.