From 12ed7c12d7c48e4c52f48a54ea110d7dff37d7ef Mon Sep 17 00:00:00 2001 From: Inki Dae Date: Fri, 24 Apr 2020 12:12:55 +0900 Subject: [PATCH] fix build error on aarch64 In aarch64, size_t is 64bit data so make sure to use correct format specifier. Change-Id: I4990e9cd8556208f626707905cd423e81d23f65b Signed-off-by: Inki Dae --- src/inference_engine_opencv.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/inference_engine_opencv.cpp b/src/inference_engine_opencv.cpp index 9fa81ca..c381087 100644 --- a/src/inference_engine_opencv.cpp +++ b/src/inference_engine_opencv.cpp @@ -199,7 +199,7 @@ int InferenceOpenCV::GetOutputLayerProperty(inference_engine_layer_property &pro } std::vector lInputShape, lOutputShape; - LOGI("%d, %d, %d, %d", mInputTensorInfo[idx].shape[0], + LOGI("%zu, %zu, %zu, %zu", mInputTensorInfo[idx].shape[0], mInputTensorInfo[idx].shape[1], mInputTensorInfo[idx].shape[2], mInputTensorInfo[idx].shape[3]); @@ -214,7 +214,7 @@ int InferenceOpenCV::GetOutputLayerProperty(inference_engine_layer_property &pro tensor_info.shape_type = INFERENCE_TENSOR_SHAPE_NCHW; // lOutputShape may have multiple tensors // even though the output layer's name is only one - LOGI("size of OutputShape: %d", lOutputShape.size()); + LOGI("size of OutputShape: %zu", lOutputShape.size()); std::vector ieInputTensorShape(lOutputShape[0].begin(), lOutputShape[0].end()); tensor_info.shape = ieInputTensorShape; @@ -222,7 +222,7 @@ int InferenceOpenCV::GetOutputLayerProperty(inference_engine_layer_property &pro LOGE("tensor_info"); for (std::vector::iterator iter2 = tensor_info.shape.begin(); iter2 != tensor_info.shape.end(); ++iter2) { - LOGI("%d", (*iter2)); + LOGI("%zu", (*iter2)); tensor_info.size *= (*iter2); } mOutputTensorInfo.push_back(tensor_info); @@ -312,7 +312,7 @@ int InferenceOpenCV::Run(std::vector &input_buff int idx = 0; if (mOutputBlobs.size() != output_buffers.size()) { - LOGE("output_buffers size is %d but outputBlobs %d", output_buffers.size(), mOutputBlobs.size()); + LOGE("output_buffers size is %zu but outputBlobs %zu", output_buffers.size(), mOutputBlobs.size()); return INFERENCE_ENGINE_ERROR_INVALID_PARAMETER; } -- 2.34.1