From 8d267fcc5d6e68c577e080b1ee8134598a5fb8a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=95=8F=E6=9D=B0?= Date: Wed, 11 Jun 2025 10:08:33 +0000 Subject: [PATCH] =?UTF-8?q?=E5=91=8A=E8=AD=A6=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 吴敏杰 --- services/samgr/native/source/collect/common_event_collect.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/samgr/native/source/collect/common_event_collect.cpp b/services/samgr/native/source/collect/common_event_collect.cpp index 6f6ca8b8..2b01a069 100644 --- a/services/samgr/native/source/collect/common_event_collect.cpp +++ b/services/samgr/native/source/collect/common_event_collect.cpp @@ -805,7 +805,7 @@ float CommonEventCollect::GetCpuUsage(const char* file, uint32_t interval) void CommonEventCollect::MonitorCpuUsageThread() { struct sysinfo info; - uint64_t coreNum = sysconf(_SC_NPROCESSORS_ONLN); + uint64_t coreNum = static_cast(sysconf(_SC_NPROCESSORS_ONLN)); uint64_t baseLoad = coreNum << CPU_LOAD_SHIFT; pthread_setname_np(pthread_self(), "OS_CPU_MONITOR"); -- Gitee