Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Commit 2347d9e

Browse files
authored
Fix klocwork issues (#4162)
1 parent 0bbd6f9 commit 2347d9e

File tree

5 files changed

+4
-13
lines changed

5 files changed

+4
-13
lines changed

src/ngraph/op/util/arithmetic_reduction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ void op::util::ArithmeticReduction::validate_and_infer_types()
8181
{
8282
axis = normalize_axis(this, axis, size_t(input_rank));
8383
}
84-
catch (const ngraph_error& err)
84+
catch (const ngraph_error&)
8585
{
8686
NODE_VALIDATION_CHECK(this,
8787
false,

src/ngraph/op/util/logical_reduction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ void op::util::LogicalReduction::validate_and_infer_types()
8080
{
8181
axis = normalize_axis(this, axis, size_t(input_rank));
8282
}
83-
catch (const ngraph_error& err)
83+
catch (const ngraph_error&)
8484
{
8585
NODE_VALIDATION_CHECK(this,
8686
false,

src/ngraph/op/util/logical_reduction_keep_dims.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void op::util::LogicalReductionKeepDims::validate_and_infer_types()
5454
{
5555
axis = normalize_axis(this, axis, size_t(input_rank));
5656
}
57-
catch (const ngraph_error& err)
57+
catch (const ngraph_error&)
5858
{
5959
NODE_VALIDATION_CHECK(this,
6060
false,

src/ngraph/pass/constant_folding_one_hot.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,35 +64,27 @@ shared_ptr<op::Constant> fold_constant_one_hot(const shared_ptr<op::Constant>& i
6464
case element::Type_t::i8:
6565
return fold_constant_one_hot_ref<int8_t, OUTPUT_TYPE>(
6666
indices, on_value, off_value, output_shape, axis);
67-
break;
6867
case element::Type_t::i16:
6968
return fold_constant_one_hot_ref<int16_t, OUTPUT_TYPE>(
7069
indices, on_value, off_value, output_shape, axis);
71-
break;
7270
case element::Type_t::i32:
7371
return fold_constant_one_hot_ref<int32_t, OUTPUT_TYPE>(
7472
indices, on_value, off_value, output_shape, axis);
75-
break;
7673
case element::Type_t::i64:
7774
return fold_constant_one_hot_ref<int64_t, OUTPUT_TYPE>(
7875
indices, on_value, off_value, output_shape, axis);
79-
break;
8076
case element::Type_t::u8:
8177
return fold_constant_one_hot_ref<uint8_t, OUTPUT_TYPE>(
8278
indices, on_value, off_value, output_shape, axis);
83-
break;
8479
case element::Type_t::u16:
8580
return fold_constant_one_hot_ref<uint16_t, OUTPUT_TYPE>(
8681
indices, on_value, off_value, output_shape, axis);
87-
break;
8882
case element::Type_t::u32:
8983
return fold_constant_one_hot_ref<uint32_t, OUTPUT_TYPE>(
9084
indices, on_value, off_value, output_shape, axis);
91-
break;
9285
case element::Type_t::u64:
9386
return fold_constant_one_hot_ref<uint64_t, OUTPUT_TYPE>(
9487
indices, on_value, off_value, output_shape, axis);
95-
break;
9688
}
9789
}
9890

src/ngraph/runtime/reference/one_hot.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ namespace ngraph
7979
{
8080
const T on_value = 1;
8181
const T off_value = 0;
82-
return one_hot<T, T>(
83-
arg, out, in_shape, out_shape, one_hot_axis, on_value, off_value);
82+
one_hot<T, T>(arg, out, in_shape, out_shape, one_hot_axis, on_value, off_value);
8483
}
8584
}
8685
}

0 commit comments

Comments
 (0)