Skip to content

Commit 67f9e76

Browse files
committed
Fix warnings
1 parent 9907b26 commit 67f9e76

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

src/plugins/intel_npu/tools/single-image-test/CMakeLists.txt

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,6 @@ endif()
1414

1515
find_package(OpenCV QUIET COMPONENTS core imgproc imgcodecs)
1616

17-
set(LINK_LIBRARIES
18-
openvino::runtime
19-
TBB::tbb
20-
opencv_core
21-
opencv_imgproc
22-
opencv_imgcodecs
23-
npu_tools_utils
24-
gflags
25-
)
26-
2717
#
2818
# check for missing dependencies
2919
#
@@ -48,7 +38,15 @@ ov_add_target(ADD_CPPLINT
4838
TYPE EXECUTABLE
4939
NAME ${TARGET_NAME}
5040
ROOT ${CMAKE_CURRENT_SOURCE_DIR}
51-
LINK_LIBRARIES PRIVATE ${LINK_LIBRARIES})
41+
LINK_LIBRARIES
42+
PRIVATE
43+
openvino::runtime
44+
TBB::tbb
45+
opencv_core
46+
opencv_imgproc
47+
opencv_imgcodecs
48+
npu_tools_utils
49+
gflags)
5250

5351
set_target_properties(${TARGET_NAME} PROPERTIES
5452
FOLDER ${CMAKE_CURRENT_SOURCE_DIR}
@@ -58,6 +56,10 @@ if (CMAKE_COMPILER_IS_GNUCXX)
5856
target_compile_options(${TARGET_NAME} PRIVATE -Wall)
5957
endif()
6058

59+
if(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG)
60+
ov_add_compiler_flags(-Wno-missing-declarations)
61+
endif()
62+
6163
#
6264
# Install
6365
#

src/plugins/intel_npu/tools/single-image-test/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ std::vector<std::vector<float>> parseMeanOrScale(const std::string& mean_scale,
522522
throw std::logic_error(std::string("Input with name '") + layer_name + "' doesn't exist.");
523523
}
524524
} else {
525-
for (int idx = 0; idx < inputs_info.size(); ++idx) {
525+
for (size_t idx = 0; idx < inputs_info.size(); ++idx) {
526526
result[idx] = mean_or_scale;
527527
}
528528
}
@@ -852,7 +852,7 @@ bool testClassification(const TensorMap& outputs, const TensorMap& references, s
852852
}
853853

854854
bool result = true;
855-
for (int i = 0; i < probsBatch.size(); i++) {
855+
for (size_t i = 0; i < probsBatch.size(); i++) {
856856
if (batch_size != 1) {
857857
std::cout << "Check tensor bundle: (" << i << "/" << batch_size << " batch)" << std::endl;
858858
}

0 commit comments

Comments
 (0)