From b9b0a8b34a88229438b9feec56ea538e66986c81 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Wed, 4 Aug 2021 09:28:20 +0300 Subject: [PATCH] Fixed compilation with clang (#6917) --- cmake/developer_package/compile_flags/os_flags.cmake | 3 ++- .../src/gna_plugin/transformations/decompose_2d_conv.cpp | 2 +- ngraph/frontend/paddlepaddle/src/op/matrix_nms.cpp | 3 ++- ngraph/frontend/paddlepaddle/src/op/multiclass_nms.cpp | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cmake/developer_package/compile_flags/os_flags.cmake b/cmake/developer_package/compile_flags/os_flags.cmake index 0dcf3a6761656c..d2c51130a9567d 100644 --- a/cmake/developer_package/compile_flags/os_flags.cmake +++ b/cmake/developer_package/compile_flags/os_flags.cmake @@ -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) diff --git a/inference-engine/src/gna_plugin/transformations/decompose_2d_conv.cpp b/inference-engine/src/gna_plugin/transformations/decompose_2d_conv.cpp index a7e337f93e0e04..ec4462782c58bd 100644 --- a/inference-engine/src/gna_plugin/transformations/decompose_2d_conv.cpp +++ b/inference-engine/src/gna_plugin/transformations/decompose_2d_conv.cpp @@ -273,7 +273,7 @@ static std::shared_ptr 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(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); diff --git a/ngraph/frontend/paddlepaddle/src/op/matrix_nms.cpp b/ngraph/frontend/paddlepaddle/src/op/matrix_nms.cpp index b5b165bcc8ea10..74d280c8d0a844 100644 --- a/ngraph/frontend/paddlepaddle/src/op/matrix_nms.cpp +++ b/ngraph/frontend/paddlepaddle/src/op/matrix_nms.cpp @@ -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; diff --git a/ngraph/frontend/paddlepaddle/src/op/multiclass_nms.cpp b/ngraph/frontend/paddlepaddle/src/op/multiclass_nms.cpp index 090f379d1fe2f2..d81d7046f8e3ee 100644 --- a/ngraph/frontend/paddlepaddle/src/op/multiclass_nms.cpp +++ b/ngraph/frontend/paddlepaddle/src/op/multiclass_nms.cpp @@ -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("normalized");