From b9b50527fdc4fff4ba5e8d5f1ab40fc00e4790bd Mon Sep 17 00:00:00 2001 From: Aleksandr Korolev Date: Wed, 17 Nov 2021 12:28:22 +0300 Subject: [PATCH] [IE[[VPU] Coverity issues fix (#8598) - Coverity issues fix - profinfo.execution_index was uninitialized in some cases - Removal deadcode --- inference-engine/src/vpu/common/src/utils/perf_report.cpp | 5 ++--- inference-engine/src/vpu/myriad_plugin/myriad_executor.cpp | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/inference-engine/src/vpu/common/src/utils/perf_report.cpp b/inference-engine/src/vpu/common/src/utils/perf_report.cpp index 32ab48c39f9..1c23568dec1 100644 --- a/inference-engine/src/vpu/common/src/utils/perf_report.cpp +++ b/inference-engine/src/vpu/common/src/utils/perf_report.cpp @@ -47,9 +47,8 @@ std::map parsePerformanceReport( stageMeta.layerType.copy(profInfo.layer_type, sizeof(profInfo.layer_type) / sizeof(profInfo.layer_type[0]), 0); stageMeta.stageType.copy(profInfo.exec_type, sizeof(profInfo.exec_type) / sizeof(profInfo.exec_type[0]), 0); - if (stageMeta.stageType == "") { - profInfo.execution_index = 0; - } else if (stageMeta.status == ie::InferenceEngineProfileInfo::EXECUTED) { + profInfo.execution_index = 0; + if (stageMeta.status == ie::InferenceEngineProfileInfo::EXECUTED) { profInfo.execution_index = execIndex; execIndex++; } diff --git a/inference-engine/src/vpu/myriad_plugin/myriad_executor.cpp b/inference-engine/src/vpu/myriad_plugin/myriad_executor.cpp index 1cc67e639e0..3cb2195cfb4 100644 --- a/inference-engine/src/vpu/myriad_plugin/myriad_executor.cpp +++ b/inference-engine/src/vpu/myriad_plugin/myriad_executor.cpp @@ -159,7 +159,7 @@ ncStatus_t MyriadExecutor::bootNextDevice(std::vector &devicePool, co if (status != NC_OK) { _log->warning("Failed to get device platform"); ncDeviceClose(&device._deviceHandle, _mvnc->watchdogHndl()); - return status != NC_OK ? status : NC_ERROR; // for dataLength error + return status; } // Get device platform