This patch will replace atoi function with strtol.
Reference : https://wiki.sei.cmu.edu/confluence/display/c/MSC24-C.+Do+not+use+deprecated+or+obsolescent+functions
Signed-off-by: Chunseok Lee <chunseok.lee@samsung.com>
if (env)
{
- _value = atoi(env);
+ _value = std::strtol(env, NULL, 0);
}
}
return 0xFFFF;
}
}
- return atoi(sdkVersion);
+ return std::strtol(sdkVersion, NULL, 0);
}
FATAL("No %s prop", sdkProp);
#endif // __ANDROID__
{
auto env = std::getenv("PURE_ARM_COMPUTE_LOG_ENABLE");
- if (env && std::atoi(env) > 0)
+ if (env && std::strtol(env, NULL, 0) > 0)
{
_enabled = true;
}
::profiling::Context::get().setProfiler(interpreter->GetProfiler());
auto enable_sync = std::getenv("PROFILING_OP_SYNC");
- if (enable_sync && std::atoi(enable_sync) != 0)
+ if (enable_sync && std::strtol(enable_sync, NULL, 0) != 0)
{
::profiling::Context::get().setSync();
}