diff --git a/uitest/core/window_operator.cpp b/uitest/core/window_operator.cpp index f802e98..4b5a926 100644 --- a/uitest/core/window_operator.cpp +++ b/uitest/core/window_operator.cpp @@ -72,7 +72,7 @@ namespace OHOS::uitest { static bool IsOperational(const WindowAction action, const WindowMode mode, ApiReplyInfo &out, size_t &index) { - for (auto dex = 0; dex < sizeof(OPERATIONS) / sizeof(Operational); dex++) { + for (unsigned long dex = 0; dex < sizeof(OPERATIONS) / sizeof(Operational); dex++) { if (OPERATIONS[dex].action == action && OPERATIONS[dex].windowMode == mode) { if (OPERATIONS[dex].support) { index = OPERATIONS[dex].index; diff --git a/uitest/napi/uitest_napi.cpp b/uitest/napi/uitest_napi.cpp index f4dde49..2c99509 100644 --- a/uitest/napi/uitest_napi.cpp +++ b/uitest/napi/uitest_napi.cpp @@ -255,7 +255,7 @@ namespace OHOS::uitest { if (g_backendObjsAboutToDelete.size() >= BACKEND_OBJ_GC_BATCH) { auto gcCall = ApiCallInfo {.apiId_ = "BackendObjectsCleaner"}; unique_lock lock(g_gcQueueMutex); - for (auto count = 0; count < BACKEND_OBJ_GC_BATCH; count++) { + for (size_t count = 0; count < BACKEND_OBJ_GC_BATCH; count++) { gcCall.paramList_.emplace_back(g_backendObjsAboutToDelete.front()); g_backendObjsAboutToDelete.pop(); }