From 0ae85d068031cb8b1b1e612c8c47e9709bbf95a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E4=BD=B3=E4=BC=9F?= Date: Wed, 13 Aug 2025 15:40:00 +0800 Subject: [PATCH] =?UTF-8?q?Description:=E5=91=8A=E8=AD=A6=E6=95=B4?= =?UTF-8?q?=E6=94=B9=20IssueNo:https://gitee.com/openharmony/startup=5Fini?= =?UTF-8?q?t/issues/ICSR9T=20Binary=20Source:No=20Signed-off-by:=20songjia?= =?UTF-8?q?wei9=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/param/include/param_manager.h | 2 +- services/param/linux/param_service.c | 4 ++-- services/param/liteos/param_client.c | 4 ++-- services/param/liteos/param_service.c | 2 +- services/param/manager/param_manager.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/services/param/include/param_manager.h b/services/param/include/param_manager.h index e2aeeb931..ec63e7a8a 100644 --- a/services/param/include/param_manager.h +++ b/services/param/include/param_manager.h @@ -152,7 +152,7 @@ INIT_LOCAL_API void ClosePersistParamWorkSpace(void); INIT_LOCAL_API int WritePersistParam(const char *name, const char *value); INIT_LOCAL_API int CheckParameterSet(const char *name, const char *value, - const ParamSecurityLabel *srcLabel, int *ctrlService); + const ParamSecurityLabel *srcLabel, uint32_t *ctrlService); INIT_LOCAL_API int CheckParamPermission(const ParamSecurityLabel *srcLabel, const char *name, uint32_t mode); diff --git a/services/param/linux/param_service.c b/services/param/linux/param_service.c index 9332af772..56792f4d0 100755 --- a/services/param/linux/param_service.c +++ b/services/param/linux/param_service.c @@ -139,7 +139,7 @@ static int SendWatcherNotifyMessage(const TriggerExtInfo *extData, const char *c static int SystemSetParam(const char *name, const char *value, const ParamSecurityLabel *srcLabel) { PARAM_LOGV("SystemWriteParam name %s value: %s", name, value); - int ctrlService = 0; + uint32_t ctrlService = 0; int ret = CheckParameterSet(name, value, srcLabel, &ctrlService); PARAM_CHECK(ret == 0, return ret, "Forbid to set parameter %s", name); @@ -162,7 +162,7 @@ static int SystemUpdateConstParamter(const char *name, const char *value, const { PARAM_LOGV("SystemUpdateConstParam name %s value: %s", name, value); uint32_t ctrlService = 0; - int ret = CheckParameterSet(name, value, srcLabel, (int *)&ctrlService); + int ret = CheckParameterSet(name, value, srcLabel, &ctrlService); PARAM_CHECK(ret == 0, return ret, "Forbid to set parameter %s", name); PARAM_CHECK(IS_READY_ONLY(name), return PARAM_CODE_INVALID_NAME, "only update read only param: %s", name); if ((ctrlService & PARAM_CTRL_SERVICE) != PARAM_CTRL_SERVICE) { // ctrl param diff --git a/services/param/liteos/param_client.c b/services/param/liteos/param_client.c index 4569fd8a2..4b9179ff4 100644 --- a/services/param/liteos/param_client.c +++ b/services/param/liteos/param_client.c @@ -48,7 +48,7 @@ __attribute__((destructor)) static void ClientDeinit(void) int SystemSetParameter(const char *name, const char *value) { PARAM_CHECK(name != NULL && value != NULL, return -1, "Invalid name or value %s", name); - int ctrlService = 0; + uint32_t ctrlService = 0; int ret = CheckParameterSet(name, value, GetParamSecurityLabel(), &ctrlService); PARAM_CHECK(ret == 0, return ret, "Forbid to set parameter %s", name); PARAM_LOGV("SystemSetParameter name %s value: %s ctrlService %d", name, value, ctrlService); @@ -72,7 +72,7 @@ int SystemWaitParameter(const char *name, const char *value, int32_t timeout) // first check permission int ret = CheckParamPermission(GetParamSecurityLabel(), name, DAC_READ); PARAM_CHECK(ret == 0, return ret, "SystemWaitParameter failed! name is: %s, errNum is: %d", name, ret); - uint32_t diff = 0; + int32_t diff = 0; struct timespec startTime = {0}; if (timeout <= 0) { timeout = DEFAULT_PARAM_WAIT_TIMEOUT; diff --git a/services/param/liteos/param_service.c b/services/param/liteos/param_service.c index cd7f5d9d3..7c8c899d5 100644 --- a/services/param/liteos/param_service.c +++ b/services/param/liteos/param_service.c @@ -103,7 +103,7 @@ void StopParamService(void) int SystemWriteParam(const char *name, const char *value) { - int ctrlService = 0; + uint32_t ctrlService = 0; int ret = CheckParameterSet(name, value, GetParamSecurityLabel(), &ctrlService); PARAM_CHECK(ret == 0, return ret, "Forbid to set parameter %s", name); PARAM_LOGV("SystemWriteParam name %s value: %s ctrlService %d", name, value, ctrlService); diff --git a/services/param/manager/param_manager.c b/services/param/manager/param_manager.c index 10e7061e5..067c34582 100644 --- a/services/param/manager/param_manager.c +++ b/services/param/manager/param_manager.c @@ -376,7 +376,7 @@ INIT_LOCAL_API int GetServiceCtrlInfo(const char *name, const char *value, Servi } INIT_LOCAL_API int CheckParameterSet(const char *name, - const char *value, const ParamSecurityLabel *srcLabel, int *ctrlService) + const char *value, const ParamSecurityLabel *srcLabel, uint32_t *ctrlService) { ParamWorkSpace *paramSpace = GetParamWorkSpace(); PARAM_CHECK(paramSpace != NULL, return PARAM_WORKSPACE_NOT_INIT, "Invalid paramSpace"); -- Gitee