diff --git a/frameworks/inputmethod_ability/src/event_target.cpp b/frameworks/inputmethod_ability/src/event_target.cpp index fc83bcc..f769c71 100644 --- a/frameworks/inputmethod_ability/src/event_target.cpp +++ b/frameworks/inputmethod_ability/src/event_target.cpp @@ -22,7 +22,7 @@ namespace OHOS { namespace MiscServices { struct EventListener { - int LISTENER_TYPTE_MAX_LENGTH = 64; + static const int LISTENER_TYPTE_MAX_LENGTH = 64; char type[LISTENER_TYPTE_MAX_LENGTH] = { 0 }; bool isOnce = false; napi_ref handlerRef = nullptr;