Skip to content

Commit

Permalink
[TF FE] Fix coverity issues to avoid uninitialized vars (openvinotool…
Browse files Browse the repository at this point in the history
…kit#27880)

**Details:** Fix coverity issues to avoid uninitialized vars

**Tickets:** 157252

Signed-off-by: Kazantsev, Roman <[email protected]>
  • Loading branch information
rkazants authored Dec 3, 2024
1 parent b8e2523 commit 9e9a70b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/frontends/tensorflow/src/checkpoint_v1_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ void CheckpointV1Reader::read_variable(const std::string& variable_name, ov::Any

// This is only present at the first item of each checkpoint file and serves
// as a table of contents, listing all the tensor slices saved in this file.
::tensorflow::SavedTensorSlices sts;
::tensorflow::SavedTensorSlices sts{};
FRONT_END_GENERAL_CHECK(sts.ParseFromArray(raw_data.data(), static_cast<int>(raw_data.size())),
"[TensorFlow Frontend] incorrect input checkpoint file or internal error: cannot parse "
"SavedTensorSlices entry");
Expand Down
2 changes: 1 addition & 1 deletion src/frontends/tensorflow/src/op/var_handle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ OutputVector translate_varhandle_op(const NodeContext& node) {

TENSORFLOW_OP_VALIDATION(node, result, "[TensorFlow Frontend] Internal error: Cannot find requested variable.");

::tensorflow::BundleEntryProto entry;
::tensorflow::BundleEntryProto entry{};
TENSORFLOW_OP_VALIDATION(node,
entry.ParseFromArray(entry_data, static_cast<int>(entry_size)),
"[TensorFlow Frontend] Internal error: Cannot get read bundle entry.");
Expand Down
2 changes: 1 addition & 1 deletion src/frontends/tensorflow/src/op/xla_conv_v2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ OutputVector translate_xla_conv_v2_op(const NodeContext& node) {
is_all_one,
"[TensorFlow Frontend] internal error: convolutional kernel with holes is not supported");

ConvolutionDimensionNumbers dimension_numbers;
ConvolutionDimensionNumbers dimension_numbers{};
TENSORFLOW_OP_VALIDATION(
node,
dimension_numbers.ParseFromArray(dimension_numbers_message.data(),
Expand Down
4 changes: 2 additions & 2 deletions src/frontends/tensorflow/src/variables_index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void VariablesIndex::read_bundle_header() {
auto item = m_variables_index.find("");
FRONT_END_GENERAL_CHECK(item != m_variables_index.end(), "Bundle Header isn't found in index");

::tensorflow::BundleHeaderProto bundleHeader;
::tensorflow::BundleHeaderProto bundleHeader{};
FRONT_END_GENERAL_CHECK(bundleHeader.ParseFromArray(item->second.data(), static_cast<int>(item->second.size())),
"Bundle Header: Cannot parse Bundle Header");
FRONT_END_GENERAL_CHECK(bundleHeader.version().producer() == 1, "Bundle Header: Unsupported producer version");
Expand All @@ -147,7 +147,7 @@ void VariablesIndex::read_checkpointable_object_graph() {
return;
}

::tensorflow::BundleEntryProto entry;
::tensorflow::BundleEntryProto entry{};
FRONT_END_GENERAL_CHECK(entry.ParseFromArray(item->second.data(), static_cast<int>(item->second.size())),
"CMO: Cannot parse Bundle Entry");

Expand Down

0 comments on commit 9e9a70b

Please sign in to comment.