From: Inki Dae Date: Thu, 16 Mar 2023 02:15:59 +0000 (+0900) Subject: fix svace issues X-Git-Tag: accepted/tizen/unified/20230316.174021^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F42%2F289942%2F1;p=platform%2Fcore%2Fmultimedia%2Finference-engine-interface.git fix svace issues [Version] : 0.4.7 [Issue type] : bug fix Fixed svace issues, SIGN_EXTENSION. write function of std::ofstream class needs streamsize type as the type of second parameter so cast existing size_t type to streamsize one. Change-Id: I632dfdb78a69d1c476cee044dcc0df3bb3f2c702 Signed-off-by: Inki Dae --- diff --git a/packaging/inference-engine-interface.spec b/packaging/inference-engine-interface.spec index dc74be5..d4945c2 100644 --- a/packaging/inference-engine-interface.spec +++ b/packaging/inference-engine-interface.spec @@ -1,6 +1,6 @@ Name: inference-engine-interface Summary: Interface of inference engines -Version: 0.4.6 +Version: 0.4.7 Release: 0 Group: Multimedia/Framework License: Apache-2.0 diff --git a/src/inference_engine_common_profiler.cpp b/src/inference_engine_common_profiler.cpp index 1aed520..97405c9 100644 --- a/src/inference_engine_common_profiler.cpp +++ b/src/inference_engine_common_profiler.cpp @@ -242,7 +242,7 @@ namespace Profiler dump_file.open(mDumpFilename, std::ios::binary | std::ios::app); if (dump_file.is_open()) { - dump_file.write(sTitleMarkdown.c_str(), sTitleMarkdown.length()); + dump_file.write(sTitleMarkdown.c_str(), static_cast(sTitleMarkdown.length())); std::vector::iterator iter; for (iter = v_mProfileData.begin(); iter != v_mProfileData.end(); @@ -250,7 +250,7 @@ namespace Profiler ProfileData data = *iter; ProfileEnv env = v_mProfileEnv[data.env_idx]; dump_file.write(env.backend_name.c_str(), - env.backend_name.length()); + static_cast(env.backend_name.length())); dump_file.write("|", 1); if (env.target_devices & INFERENCE_TARGET_CPU) dump_file.write("CPU", 3); @@ -258,13 +258,13 @@ namespace Profiler dump_file.write("GPU", 3); dump_file.write("|", 1); dump_file.write(env.model_name.c_str(), - env.model_name.length()); + static_cast(env.model_name.length())); dump_file.write("|", 1); dump_file.write(data.function_name.c_str(), - data.function_name.length()); + static_cast(data.function_name.length())); dump_file.write("|", 1); std::string sElapsedTime(std::to_string(data.elapsed_time)); - dump_file.write(sElapsedTime.c_str(), sElapsedTime.length()); + dump_file.write(sElapsedTime.c_str(), static_cast(sElapsedTime.length())); dump_file.write("\n", 1); } @@ -272,7 +272,7 @@ namespace Profiler std::string sMemoryUsage = std::to_string(mEndMemoryData.rss - mStartMemoryData.rss) + "KB Memory used"; - dump_file.write(sMemoryUsage.c_str(), sMemoryUsage.length()); + dump_file.write(sMemoryUsage.c_str(), static_cast(sMemoryUsage.length())); dump_file.write("\n", 1); dump_file.write("***\n", 4); }