diff --git a/frameworks/inputmethod_ability/src/input_method_core_proxy.cpp b/frameworks/inputmethod_ability/src/input_method_core_proxy.cpp index 28e333f..1626863 100644 --- a/frameworks/inputmethod_ability/src/input_method_core_proxy.cpp +++ b/frameworks/inputmethod_ability/src/input_method_core_proxy.cpp @@ -287,7 +287,7 @@ namespace MiscServices { return code; } - int32_t InputMethodCoreProxy::getKeyboardWindowHeight(int32_t retHeight) + int32_t InputMethodCoreProxy::getKeyboardWindowHeight(int32_t &retHeight) { IMSA_HILOGI("InputMethodCoreProxy::getKeyboardWindowHeight"); auto remote = Remote(); diff --git a/services/src/input_method_system_ability.cpp b/services/src/input_method_system_ability.cpp index 20886f2..40f6e9a 100644 --- a/services/src/input_method_system_ability.cpp +++ b/services/src/input_method_system_ability.cpp @@ -208,7 +208,7 @@ namespace MiscServices { std::map::const_iterator it = msgHandlers.find(MAIN_USER_ID); if (it == msgHandlers.end()) { IMSA_HILOGE("InputMethodSystemAbility::StartInputService() need start handler"); - MessageHandler *handler = new MessageHandler(); + sptr handler = new MessageHandler(); if (session) { IMSA_HILOGE("InputMethodSystemAbility::OnPrepareInput session is not nullptr"); session->CreateWorkThread(*handler); diff --git a/services/src/peruser_session.cpp b/services/src/peruser_session.cpp index 14a2822..39ea66f 100644 --- a/services/src/peruser_session.cpp +++ b/services/src/peruser_session.cpp @@ -237,7 +237,7 @@ namespace MiscServices { { IMSA_HILOGI("PerUserSession::ResetIme"); std::unique_lock lock(mtx); - InputMethodProperty *ime[] = {defaultIme, securityIme}; + InputMethodProperty *ime[2] = {defaultIme, securityIme}; for (int i = 0; i < MIN_IME; i++) { if (currentIme[i] == ime[i] && ime[i]) { continue; diff --git a/services/src/peruser_setting.cpp b/services/src/peruser_setting.cpp index 902ce6f..2fc1d64 100644 --- a/services/src/peruser_setting.cpp +++ b/services/src/peruser_setting.cpp @@ -76,7 +76,7 @@ namespace MiscServices { * ErrorCode::ERROR_NOT_IME_PACKAGE The installed package is not an IME package. * ErrorCode::ERROR_IME_PACKAGE_DUPLICATED The installed package is duplicated. */ - int PerUserSetting::OnPackageAdded(std::u16string& packageName, bool isSecurityIme) + int PerUserSetting::OnPackageAdded(std::u16string& packageName, bool &isSecurityIme) { if (isSecurityIme) { isSecurityIme = false; @@ -126,7 +126,7 @@ namespace MiscServices { * and is removed from the input method management system * ErrorCode::ERROR_NOT_IME_PACKAGE The removed package is not an IME package. */ - int PerUserSetting::OnPackageRemoved(std::u16string& packageName, bool isSecurityIme) + int PerUserSetting::OnPackageRemoved(std::u16string& packageName, bool &isSecurityIme) { if (isSecurityIme) { isSecurityIme = false;