Fix UNREACHABLE_CODE issues 27/232727/1
authorInki Dae <inki.dae@samsung.com>
Thu, 7 May 2020 09:05:57 +0000 (18:05 +0900)
committerInki Dae <inki.dae@samsung.com>
Thu, 7 May 2020 09:14:42 +0000 (18:14 +0900)
Change-Id: Idb729c0e74c21e60285df6dd1ffd1a0f9f217aeb
Signed-off-by: Inki Dae <inki.dae@samsung.com>
src/inference_engine_profiler.cpp

index c9427a1..b4a9c2e 100644 (file)
@@ -133,7 +133,7 @@ void InferenceEngineProfiler::GetMemoryUsage(MemoryData &data)
 
 void InferenceEngineProfiler::Start(const unsigned int type)
 {
-       if (IE_PROFILER_MIN >= type && IE_PROFILER_MAX <= type) {
+       if (IE_PROFILER_MIN >= type || IE_PROFILER_MAX <= type) {
                LOGE("Invalid profiler type.");
                return;
        }
@@ -152,7 +152,7 @@ void InferenceEngineProfiler::Start(const unsigned int type)
 
 void InferenceEngineProfiler::Stop(const unsigned int type, const char *func_name)
 {
-       if (IE_PROFILER_MIN >= type && IE_PROFILER_MAX <= type) {
+       if (IE_PROFILER_MIN >= type || IE_PROFILER_MAX <= type) {
                LOGE("Invalid profiler type.");
                return;
        }
@@ -235,7 +235,7 @@ void InferenceEngineProfiler::DumpToFile(const unsigned int dump_type, std::stri
 
 void InferenceEngineProfiler::Dump(const unsigned int dump_type)
 {
-       if (IE_PROFILER_DUMP_MIN >= dump_type && IE_PROFILER_DUMP_MAX <= dump_type) {
+       if (IE_PROFILER_DUMP_MIN >= dump_type || IE_PROFILER_DUMP_MAX <= dump_type) {
                LOGE("Invalid profiler dump type.");
                return;
        }