未验证 提交 13d5d7b0 编写于 作者: O openharmony_ci 提交者: Gitee

!269 ipc codex fixed

Merge pull request !269 from 周礼亭/master
......@@ -67,7 +67,8 @@ void AcquireObject(flat_binder_object *flat, const void *cookie)
break;
}
case BINDER_TYPE_FD:
flat->handle = dup(flat->handle);
flat->handle = static_cast<uint32_t>(dup(flat->handle));
flat->cookie = 1;
break;
default:
DBINDER_LOGE("binder object type is invalid.");
......
......@@ -27,11 +27,11 @@ napi_value NapiOhosRpcMessageOptionGetFlags(napi_env env, napi_callback_info inf
napi_get_cb_info(env, info, nullptr, nullptr, &thisVar, nullptr);
NAPI_ASSERT(env, thisVar != nullptr, "failed to get js message option object");
MessageOption *option = nullptr;
napi_status status = napi_unwrap(env, thisVar, (void **)&option);
napi_unwrap(env, thisVar, (void **)&option);
NAPI_ASSERT(env, option != nullptr, "failed to get native message option");
int flags = option->GetFlags();
napi_value result = nullptr;
status = napi_create_int32(env, flags, &result);
napi_status status = napi_create_int32(env, flags, &result);
NAPI_ASSERT(env, status == napi_ok, "failed to create int32 value");
return result;
}
......@@ -53,7 +53,7 @@ napi_value NapiOhosRpcMessageOptionSetFlags(napi_env env, napi_callback_info inf
napi_status status = napi_get_value_int32(env, argv[0], &flags);
NAPI_ASSERT(env, status == napi_ok, "failed to get int32 value");
MessageOption *option = nullptr;
status = napi_unwrap(env, thisVar, (void **)&option);
napi_unwrap(env, thisVar, (void **)&option);
NAPI_ASSERT(env, option != nullptr, "failed to get native message option");
option->SetFlags(flags);
napi_value result = nullptr;
......@@ -70,11 +70,11 @@ napi_value NapiOhosRpcMessageOptionGetWaittime(napi_env env, napi_callback_info
napi_get_cb_info(env, info, nullptr, nullptr, &thisVar, nullptr);
NAPI_ASSERT(env, thisVar != nullptr, "failed to get js message option object");
MessageOption *option = nullptr;
napi_status status = napi_unwrap(env, thisVar, (void **)&option);
napi_unwrap(env, thisVar, (void **)&option);
NAPI_ASSERT(env, option != nullptr, "failed to get native message option");
int flags = option->GetWaitTime();
napi_value result = nullptr;
status = napi_create_int32(env, flags, &result);
napi_status status = napi_create_int32(env, flags, &result);
NAPI_ASSERT(env, status == napi_ok, "failed to create int32 value");
return result;
}
......@@ -96,7 +96,7 @@ napi_value NapiOhosRpcMessageOptionSetWaittime(napi_env env, napi_callback_info
napi_status status = napi_get_value_int32(env, argv[0], &waittime);
NAPI_ASSERT(env, status == napi_ok, "failed to get int32 value");
MessageOption *option = nullptr;
status = napi_unwrap(env, thisVar, (void **)&option);
napi_unwrap(env, thisVar, (void **)&option);
NAPI_ASSERT(env, option != nullptr, "failed to get native message option");
option->SetWaitTime(waittime);
napi_value result = nullptr;
......
......@@ -1606,7 +1606,7 @@ napi_value NAPI_RemoteProxy_sendRequest(napi_env env, napi_callback_info info)
napi_get_value_int32(env, argv[0], &code);
NAPIRemoteProxyHolder *proxyHolder = nullptr;
status = napi_unwrap(env, thisVar, (void **)&proxyHolder);
napi_unwrap(env, thisVar, (void **)&proxyHolder);
NAPI_ASSERT(env, proxyHolder != nullptr, "failed to get proxy holder");
sptr<IRemoteObject> target = proxyHolder->object_;
NAPI_ASSERT(env, target != nullptr, "invalid proxy object");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册