From fbfa6fe4af820021c8c31403911195894c7cb1e2 Mon Sep 17 00:00:00 2001 From: h60047265 Date: Wed, 12 Mar 2025 16:04:21 +0800 Subject: [PATCH] =?UTF-8?q?samgr=5Flite=E5=91=8A=E8=AD=A6=E6=B8=85?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: h60047265 --- samgr/source/message.c | 4 ++-- samgr_endpoint/source/samgr_small_ipc_adapter.c | 6 +++--- samgr_server/source/samgr_server_rpc.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/samgr/source/message.c b/samgr/source/message.c index c35e761..bc56555 100644 --- a/samgr/source/message.c +++ b/samgr/source/message.c @@ -36,7 +36,7 @@ int32 SAMGR_SendRequest(const Identity *identity, const Request *request, Handle return EC_INVALID; } - Exchange exchange = {*identity, *request, {NULL, 0}, MSG_NON, handler, NULL}; + Exchange exchange = {*identity, *request, {NULL, 0, NULL}, MSG_NON, handler, NULL}; exchange.id.queueId = NULL; if (handler != NULL) { exchange.id.queueId = SAMGR_GetCurrentQueueID(); @@ -120,7 +120,7 @@ uint32 *SAMGR_SendSharedRequest(const Identity *identity, const Request *request if (identity == NULL || request == NULL) { return NULL; } - Exchange exchange = {*identity, *request, {NULL, 0}, MSG_NON, handler, token}; + Exchange exchange = {*identity, *request, {NULL, 0, NULL}, MSG_NON, handler, token}; exchange.type = (handler == NULL) ? MSG_NON : MSG_CON; exchange.id.queueId = NULL; int32 err = SharedSend(identity->queueId, &exchange, 0); diff --git a/samgr_endpoint/source/samgr_small_ipc_adapter.c b/samgr_endpoint/source/samgr_small_ipc_adapter.c index 577bcc7..b63f27f 100644 --- a/samgr_endpoint/source/samgr_small_ipc_adapter.c +++ b/samgr_endpoint/source/samgr_small_ipc_adapter.c @@ -97,8 +97,8 @@ void Listen(Endpoint *endpoint, int token, const char *service, const char *feat registerEpArg->endpoint = endpoint; registerEpArg->token = token; - registerEpArg->service = service; - registerEpArg->feature = feature; + registerEpArg->service = (char *)service; + registerEpArg->feature = (char *)feature; endpoint->boss = (ThreadId)THREAD_Create(Receive, registerEpArg, &attr); } @@ -348,7 +348,7 @@ static void GetRemotePolicy(IpcIo *reply, PolicyTrans **policy, uint32 *policyNu return; } for (i = 0; i < *policyNum; i++) { - if (!ReadInt32(reply, &(*policy)[i].type)) { + if (!ReadInt32(reply, (int32_t *)&(*policy)[i].type)) { continue; } switch ((*policy)[i].type) { diff --git a/samgr_server/source/samgr_server_rpc.c b/samgr_server/source/samgr_server_rpc.c index 2f4a82c..388a91d 100644 --- a/samgr_server/source/samgr_server_rpc.c +++ b/samgr_server/source/samgr_server_rpc.c @@ -329,7 +329,7 @@ static int32 ProcPutFeature(SamgrServer *server, const void *origin, IpcIo *req, return EC_INVALID; } #ifndef MINI_SAMGR_LITE_RPC - ReadUint32(req, &identity->token); + ReadUint32(req, (uint32_t *)&identity->token); #else identity->token = ReadPointer(req); #endif -- Gitee