cppCheck问题整改

Signed-off-by: 张余 <1459392684@qq.com>
Change-Id: I849b4ab949f8ef30e623b21874ffc2aed7180c8a
This commit is contained in:
张余 2024-09-20 10:30:57 +08:00
parent 170912bc65
commit 12e11227ef
3 changed files with 2 additions and 7 deletions

View File

@ -34,7 +34,7 @@ napi_value ParseUint32(napi_env env, napi_value object, uint32_t &store);
napi_value ParseBoolean(napi_env env, napi_value object, bool &status);
napi_value ParseString(napi_env env, napi_value object, CmBlob *&blob);
void ThrowError(napi_env env, int32_t errorCode, std::string errMsg);
void ThrowError(napi_env env, int32_t errorCode, const std::string errMsg);
napi_value GenerateBusinessError(napi_env env, int32_t errorCode);
void GeneratePromise(napi_env env, napi_deferred deferred, int32_t resultCode,

View File

@ -163,7 +163,7 @@ napi_value GenerateBusinessError(napi_env env, int32_t errorCode)
return businessErrorMsg;
}
void ThrowError(napi_env env, int32_t errorCode, std::string errMsg)
void ThrowError(napi_env env, int32_t errorCode, const std::string errMsg)
{
napi_value paramsError = nullptr;
napi_value outCode = nullptr;

View File

@ -195,11 +195,6 @@ static void StartUIExtensionAbility(std::shared_ptr<CmUIExtensionRequestContext>
OHOS::AAFwk::Want want)
{
CM_LOG_D("begin StartUIExtensionAbility");
if (asyncContext == nullptr) {
CM_LOG_E("asyncContext is null");
ThrowError(asyncContext->env, PARAM_ERROR, "asyncContext is null");
return;
}
auto abilityContext = asyncContext->context;
if (abilityContext == nullptr) {
CM_LOG_E("abilityContext is null");