Unverified Commit 2347d9e7 authored by Scott Cyphers's avatar Scott Cyphers Committed by GitHub

Fix klocwork issues (#4162)

parent 0bbd6f9d
...@@ -81,7 +81,7 @@ void op::util::ArithmeticReduction::validate_and_infer_types() ...@@ -81,7 +81,7 @@ void op::util::ArithmeticReduction::validate_and_infer_types()
{ {
axis = normalize_axis(this, axis, size_t(input_rank)); axis = normalize_axis(this, axis, size_t(input_rank));
} }
catch (const ngraph_error& err) catch (const ngraph_error&)
{ {
NODE_VALIDATION_CHECK(this, NODE_VALIDATION_CHECK(this,
false, false,
......
...@@ -80,7 +80,7 @@ void op::util::LogicalReduction::validate_and_infer_types() ...@@ -80,7 +80,7 @@ void op::util::LogicalReduction::validate_and_infer_types()
{ {
axis = normalize_axis(this, axis, size_t(input_rank)); axis = normalize_axis(this, axis, size_t(input_rank));
} }
catch (const ngraph_error& err) catch (const ngraph_error&)
{ {
NODE_VALIDATION_CHECK(this, NODE_VALIDATION_CHECK(this,
false, false,
......
...@@ -54,7 +54,7 @@ void op::util::LogicalReductionKeepDims::validate_and_infer_types() ...@@ -54,7 +54,7 @@ void op::util::LogicalReductionKeepDims::validate_and_infer_types()
{ {
axis = normalize_axis(this, axis, size_t(input_rank)); axis = normalize_axis(this, axis, size_t(input_rank));
} }
catch (const ngraph_error& err) catch (const ngraph_error&)
{ {
NODE_VALIDATION_CHECK(this, NODE_VALIDATION_CHECK(this,
false, false,
......
...@@ -64,35 +64,27 @@ shared_ptr<op::Constant> fold_constant_one_hot(const shared_ptr<op::Constant>& i ...@@ -64,35 +64,27 @@ shared_ptr<op::Constant> fold_constant_one_hot(const shared_ptr<op::Constant>& i
case element::Type_t::i8: case element::Type_t::i8:
return fold_constant_one_hot_ref<int8_t, OUTPUT_TYPE>( return fold_constant_one_hot_ref<int8_t, OUTPUT_TYPE>(
indices, on_value, off_value, output_shape, axis); indices, on_value, off_value, output_shape, axis);
break;
case element::Type_t::i16: case element::Type_t::i16:
return fold_constant_one_hot_ref<int16_t, OUTPUT_TYPE>( return fold_constant_one_hot_ref<int16_t, OUTPUT_TYPE>(
indices, on_value, off_value, output_shape, axis); indices, on_value, off_value, output_shape, axis);
break;
case element::Type_t::i32: case element::Type_t::i32:
return fold_constant_one_hot_ref<int32_t, OUTPUT_TYPE>( return fold_constant_one_hot_ref<int32_t, OUTPUT_TYPE>(
indices, on_value, off_value, output_shape, axis); indices, on_value, off_value, output_shape, axis);
break;
case element::Type_t::i64: case element::Type_t::i64:
return fold_constant_one_hot_ref<int64_t, OUTPUT_TYPE>( return fold_constant_one_hot_ref<int64_t, OUTPUT_TYPE>(
indices, on_value, off_value, output_shape, axis); indices, on_value, off_value, output_shape, axis);
break;
case element::Type_t::u8: case element::Type_t::u8:
return fold_constant_one_hot_ref<uint8_t, OUTPUT_TYPE>( return fold_constant_one_hot_ref<uint8_t, OUTPUT_TYPE>(
indices, on_value, off_value, output_shape, axis); indices, on_value, off_value, output_shape, axis);
break;
case element::Type_t::u16: case element::Type_t::u16:
return fold_constant_one_hot_ref<uint16_t, OUTPUT_TYPE>( return fold_constant_one_hot_ref<uint16_t, OUTPUT_TYPE>(
indices, on_value, off_value, output_shape, axis); indices, on_value, off_value, output_shape, axis);
break;
case element::Type_t::u32: case element::Type_t::u32:
return fold_constant_one_hot_ref<uint32_t, OUTPUT_TYPE>( return fold_constant_one_hot_ref<uint32_t, OUTPUT_TYPE>(
indices, on_value, off_value, output_shape, axis); indices, on_value, off_value, output_shape, axis);
break;
case element::Type_t::u64: case element::Type_t::u64:
return fold_constant_one_hot_ref<uint64_t, OUTPUT_TYPE>( return fold_constant_one_hot_ref<uint64_t, OUTPUT_TYPE>(
indices, on_value, off_value, output_shape, axis); indices, on_value, off_value, output_shape, axis);
break;
} }
} }
......
...@@ -79,8 +79,7 @@ namespace ngraph ...@@ -79,8 +79,7 @@ namespace ngraph
{ {
const T on_value = 1; const T on_value = 1;
const T off_value = 0; const T off_value = 0;
return one_hot<T, T>( one_hot<T, T>(arg, out, in_shape, out_shape, one_hot_axis, on_value, off_value);
arg, out, in_shape, out_shape, one_hot_axis, on_value, off_value);
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment