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

Commit

Permalink
Fix klocwork issues (#4162)
Browse files Browse the repository at this point in the history
  • Loading branch information
diyessi authored Jan 11, 2020
1 parent 0bbd6f9 commit 2347d9e
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/ngraph/op/util/arithmetic_reduction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void op::util::ArithmeticReduction::validate_and_infer_types()
{
axis = normalize_axis(this, axis, size_t(input_rank));
}
catch (const ngraph_error& err)
catch (const ngraph_error&)
{
NODE_VALIDATION_CHECK(this,
false,
Expand Down
2 changes: 1 addition & 1 deletion src/ngraph/op/util/logical_reduction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void op::util::LogicalReduction::validate_and_infer_types()
{
axis = normalize_axis(this, axis, size_t(input_rank));
}
catch (const ngraph_error& err)
catch (const ngraph_error&)
{
NODE_VALIDATION_CHECK(this,
false,
Expand Down
2 changes: 1 addition & 1 deletion src/ngraph/op/util/logical_reduction_keep_dims.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void op::util::LogicalReductionKeepDims::validate_and_infer_types()
{
axis = normalize_axis(this, axis, size_t(input_rank));
}
catch (const ngraph_error& err)
catch (const ngraph_error&)
{
NODE_VALIDATION_CHECK(this,
false,
Expand Down
8 changes: 0 additions & 8 deletions src/ngraph/pass/constant_folding_one_hot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,35 +64,27 @@ shared_ptr<op::Constant> fold_constant_one_hot(const shared_ptr<op::Constant>& i
case element::Type_t::i8:
return fold_constant_one_hot_ref<int8_t, OUTPUT_TYPE>(
indices, on_value, off_value, output_shape, axis);
break;
case element::Type_t::i16:
return fold_constant_one_hot_ref<int16_t, OUTPUT_TYPE>(
indices, on_value, off_value, output_shape, axis);
break;
case element::Type_t::i32:
return fold_constant_one_hot_ref<int32_t, OUTPUT_TYPE>(
indices, on_value, off_value, output_shape, axis);
break;
case element::Type_t::i64:
return fold_constant_one_hot_ref<int64_t, OUTPUT_TYPE>(
indices, on_value, off_value, output_shape, axis);
break;
case element::Type_t::u8:
return fold_constant_one_hot_ref<uint8_t, OUTPUT_TYPE>(
indices, on_value, off_value, output_shape, axis);
break;
case element::Type_t::u16:
return fold_constant_one_hot_ref<uint16_t, OUTPUT_TYPE>(
indices, on_value, off_value, output_shape, axis);
break;
case element::Type_t::u32:
return fold_constant_one_hot_ref<uint32_t, OUTPUT_TYPE>(
indices, on_value, off_value, output_shape, axis);
break;
case element::Type_t::u64:
return fold_constant_one_hot_ref<uint64_t, OUTPUT_TYPE>(
indices, on_value, off_value, output_shape, axis);
break;
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/ngraph/runtime/reference/one_hot.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ namespace ngraph
{
const T on_value = 1;
const T off_value = 0;
return one_hot<T, T>(
arg, out, in_shape, out_shape, one_hot_axis, on_value, off_value);
one_hot<T, T>(arg, out, in_shape, out_shape, one_hot_axis, on_value, off_value);
}
}
}
Expand Down

0 comments on commit 2347d9e

Please sign in to comment.