diff --git a/interfaces/innerkits/task_dispatcher/src/threading/worker_pool.cpp b/interfaces/innerkits/task_dispatcher/src/threading/worker_pool.cpp index 1f0aaf43ab7540eb33bb811cebf47223b2a0c7db..4bdfa2289e977ad876d201170fd2ba9613da1029 100644 --- a/interfaces/innerkits/task_dispatcher/src/threading/worker_pool.cpp +++ b/interfaces/innerkits/task_dispatcher/src/threading/worker_pool.cpp @@ -267,7 +267,7 @@ bool WorkerPool::AddWorker(const std::shared_ptr &delegate, const std: APP_LOGD("WorkerPool::AddWorker create new thread"); pool_.emplace_back(newThread); - APP_LOGD("POOL SIZE: %{public}d", pool_.size()); + APP_LOGD("POOL SIZE: %{public}zu", pool_.size()); APP_LOGD("pool_ add end"); added = true; @@ -284,10 +284,10 @@ void WorkerPool::OnWorkerExit(const std::shared_ptr &worker, bool std::unique_lock mLock(poolLock_); APP_LOGD("WorkerPool::OnWorkerExit start"); - APP_LOGD("size:%{public}d", pool_.size()); + APP_LOGD("size:%{public}zu", pool_.size()); for (auto it = pool_.begin(); it != pool_.end(); it++) { if ((*it).get() == worker.get()) { - APP_LOGD("WorkerPool::OnWorkerExit erase current, size=%{public}d, threads=%{public}d", + APP_LOGD("WorkerPool::OnWorkerExit erase current, size=%{public}zu, threads=%{public}d", pool_.size(), GetWorkingThreadNum(control_.load())); { diff --git a/kits/appkit/native/app/src/context_container.cpp b/kits/appkit/native/app/src/context_container.cpp index 7c1782dd25873bb1021a1b4026c4bbc02fa69318..1fa7cb46047a4da232f57a4a96e2a96096443459 100755 --- a/kits/appkit/native/app/src/context_container.cpp +++ b/kits/appkit/native/app/src/context_container.cpp @@ -633,7 +633,7 @@ std::shared_ptr ContextContainer::CreateBundleContext(std::string bundl } BundleInfo bundleInfo; - APP_LOGI("ContextContainer::CreateBundleContext length: %{public}d, bundleName: %{public}s", + APP_LOGI("ContextContainer::CreateBundleContext length: %{public}zu, bundleName: %{public}s", bundleName.length(), bundleName.c_str()); bundleMgr->GetBundleInfo(bundleName, BundleFlag::GET_BUNDLE_DEFAULT, bundleInfo); @@ -671,10 +671,10 @@ void ContextContainer::InitResourceManager(BundleInfo &bundleInfo, std::shared_p } APP_LOGI( - "ContextContainer::InitResourceManager moduleResPaths count: %{public}d", bundleInfo.moduleResPaths.size()); + "ContextContainer::InitResourceManager moduleResPaths count: %{public}zu", bundleInfo.moduleResPaths.size()); for (auto moduleResPath : bundleInfo.moduleResPaths) { if (!moduleResPath.empty()) { - APP_LOGI("ContextContainer::InitResourceManager length: %{public}d, moduleResPath: %{public}s", + APP_LOGI("ContextContainer::InitResourceManager length: %{public}zu, moduleResPath: %{public}s", moduleResPath.length(), moduleResPath.c_str()); if (!resourceManager->AddResource(moduleResPath.c_str())) { diff --git a/kits/appkit/native/app/src/main_thread.cpp b/kits/appkit/native/app/src/main_thread.cpp index 3e6dc7fbf2308c5ee43c5eb5746f934e71b4a3d2..2b66932ead34409bdeb8947cb9ff6d914e980f05 100644 --- a/kits/appkit/native/app/src/main_thread.cpp +++ b/kits/appkit/native/app/src/main_thread.cpp @@ -607,15 +607,15 @@ void MainThread::HandleLaunchApplication(const AppLaunchData &appLaunchData) } BundleInfo bundleInfo; - APP_LOGI("MainThread::handleLaunchApplication length: %{public}d, bundleName: %{public}s", + APP_LOGI("MainThread::handleLaunchApplication length: %{public}zu, bundleName: %{public}s", appInfo.bundleName.length(), appInfo.bundleName.c_str()); bundleMgr->GetBundleInfo(appInfo.bundleName, BundleFlag::GET_BUNDLE_DEFAULT, bundleInfo); - APP_LOGI("MainThread::handleLaunchApplication moduleResPaths count: %{public}d", bundleInfo.moduleResPaths.size()); + APP_LOGI("MainThread::handleLaunchApplication moduleResPaths count: %{public}zu", bundleInfo.moduleResPaths.size()); for (auto moduleResPath : bundleInfo.moduleResPaths) { if (!moduleResPath.empty()) { - APP_LOGI("MainThread::handleLaunchApplication length: %{public}d, moduleResPath: %{public}s", + APP_LOGI("MainThread::handleLaunchApplication length: %{public}zu, moduleResPath: %{public}s", moduleResPath.length(), moduleResPath.c_str()); if (!resourceManager->AddResource(moduleResPath.c_str())) { diff --git a/test/resource/amssystemtestability/abilitySrc/taskDispatcherTestA/src/main_ability.cpp b/test/resource/amssystemtestability/abilitySrc/taskDispatcherTestA/src/main_ability.cpp index d8d9942b836825a481bfc6efccb6a1864c522419..cd1ad9aae0224f465a5bfd66f992b5a8092284da 100644 --- a/test/resource/amssystemtestability/abilitySrc/taskDispatcherTestA/src/main_ability.cpp +++ b/test/resource/amssystemtestability/abilitySrc/taskDispatcherTestA/src/main_ability.cpp @@ -244,22 +244,22 @@ void GetTaskIndex(std::vector &outerTaskIndex, std::vector &outerTaskIndex, std::vector