fix build error on aarch64 24/231724/2 accepted/tizen/unified/20200510.220415 submit/tizen/20200424.035635 submit/tizen/20200424.041307 submit/tizen/20200424.055009 submit/tizen/20200508.021019
authorInki Dae <inki.dae@samsung.com>
Fri, 24 Apr 2020 03:12:55 +0000 (12:12 +0900)
committerInki Dae <inki.dae@samsung.com>
Fri, 24 Apr 2020 03:41:24 +0000 (12:41 +0900)
In aarch64, size_t is 64bit data so make sure to use correct
format specifier.

Change-Id: I4990e9cd8556208f626707905cd423e81d23f65b
Signed-off-by: Inki Dae <inki.dae@samsung.com>
src/inference_engine_opencv.cpp

index 9fa81caaddcc1285c30f02a2ec7db6a2446168ea..c381087785304c2e1f6982c80ec689d0048c8336 100644 (file)
@@ -199,7 +199,7 @@ int InferenceOpenCV::GetOutputLayerProperty(inference_engine_layer_property &pro
         }
 
         std::vector<cv::dnn::MatShape> 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<size_t> 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<size_t>::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<inference_engine_tensor_buffer> &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;
     }