mirror of
https://gitee.com/openharmony/hiviewdfx_hitrace
synced 2024-11-23 15:59:51 +00:00
fix: 修复cppCheck告警
Signed-off-by: jiangwei <jiangwei214@h-partners.com>
This commit is contained in:
parent
d38b54a6b1
commit
0a4e8bb210
@ -183,7 +183,7 @@ static napi_value JSTraceFinish(napi_env env, napi_callback_info info)
|
||||
napi_value thisVar;
|
||||
NAPI_CALL(env, napi_get_cb_info(env, info, &argc, argv, &thisVar, NULL));
|
||||
NAPI_ASSERT(env, argc >= ARGC_NUMBER_TWICE, "Wrong number of arguments");
|
||||
(void)JsStrNumParamsFunc(env, info, [&env] (std::string name, napi_value& nValue) -> bool {
|
||||
(void)JsStrNumParamsFunc(env, info, [&env] (std::string name, const napi_value& nValue) -> bool {
|
||||
int taskId = 0;
|
||||
if (!ParseInt32Param(env, nValue, taskId)) {
|
||||
return false;
|
||||
@ -201,7 +201,7 @@ static napi_value JSTraceCount(napi_env env, napi_callback_info info)
|
||||
napi_value thisVar;
|
||||
NAPI_CALL(env, napi_get_cb_info(env, info, &argc, argv, &thisVar, NULL));
|
||||
NAPI_ASSERT(env, argc == ARGC_NUMBER_TWICE, "Wrong number of arguments");
|
||||
(void)JsStrNumParamsFunc(env, info, [&env] (std::string name, napi_value& nValue) -> bool {
|
||||
(void)JsStrNumParamsFunc(env, info, [&env] (std::string name, const napi_value& nValue) -> bool {
|
||||
int64_t count = 0;
|
||||
if (!ParseInt64Param(env, nValue, count)) {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user