Skip to content

Commit

Permalink
Fixed compilation with clang (openvinotoolkit#6917)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-lavrenov authored and akuporos committed Sep 29, 2021
1 parent 0d12e30 commit c410eb6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion cmake/developer_package/compile_flags/os_flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,8 @@ else()
elseif(UNIX)
ie_add_compiler_flags(-Wuninitialized -Winit-self)
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
ie_add_compiler_flags(-Winconsistent-missing-override)
ie_add_compiler_flags(-Winconsistent-missing-override
-Wstring-plus-int)
else()
ie_add_compiler_flags(-Wmaybe-uninitialized)
check_cxx_compiler_flag("-Wsuggest-override" SUGGEST_OVERRIDE_SUPPORTED)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ static std::shared_ptr<ngraph::Node> Create1DConv(const GraphData& graph_data, c
}

// Max pooling
if (graph_data.max_pool && graph_data.pool_size_width > 1 || graph_data.pool_stride_width > 1) {
if ((graph_data.max_pool && graph_data.pool_size_width > 1) || graph_data.pool_stride_width > 1) {
last_conv_block_op = std::make_shared<ngraph::opset7::MaxPool>(last_conv_block_op,
ngraph::Strides{1, graph_data.pool_stride_width}, ngraph::Shape{0, 0}, ngraph::Shape{0, 0},
ngraph::Shape{1, graph_data.pool_size_width}, graph_data.max_pool->get_rounding_type(), ngraph::op::PadType::VALID);
Expand Down
3 changes: 2 additions & 1 deletion ngraph/frontend/paddlepaddle/src/op/matrix_nms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ namespace ngraph

auto out_names = node.get_output_names();
PDPD_ASSERT(out_names.size() == 3 || out_names.size() == 2,
"Unexpected number of outputs of MatrixNMS: " + out_names.size());
"Unexpected number of outputs of MatrixNMS: " +
std::to_string(out_names.size()));

element::Type type_num = i32;
bool return_rois_num = true;
Expand Down
2 changes: 1 addition & 1 deletion ngraph/frontend/paddlepaddle/src/op/multiclass_nms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace ngraph
PDPD_ASSERT((type_index == i32 || type_index == i64) &&
(type_num == i32 || type_num == i64),
"Unexpected data type of outputs of MulticlassNMS: " +
out_names.size());
std::to_string(out_names.size()));

auto normalized = node.get_attribute<bool>("normalized");

Expand Down

0 comments on commit c410eb6

Please sign in to comment.