From cf52b5aceaa02ae8997a728b93acac92176bf213 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A8=8A=E6=99=AF=E4=B9=90?= Date: Tue, 5 Aug 2025 20:51:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E5=91=8A=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 樊景乐 --- modules/common/appspawn_encaps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/common/appspawn_encaps.c b/modules/common/appspawn_encaps.c index f5c11a25..302c256f 100644 --- a/modules/common/appspawn_encaps.c +++ b/modules/common/appspawn_encaps.c @@ -149,7 +149,7 @@ APPSPAWN_STATIC int AddPermissionIntArrayToValue(cJSON *arrayItem, UserEncap *en APPSPAWN_CHECK(value != NULL, return APPSPAWN_SYSTEM_ERROR, "Failed to calloc int array value"); cJSON *arrayItemTemp = arrayItem; - for (int index = 0; index < arraySize; index++) { + for (size_t index = 0; index < arraySize; index++) { if (arrayItemTemp == NULL || !cJSON_IsNumber(arrayItemTemp)) { free(value); APPSPAWN_LOGE("Invalid int array item type"); @@ -173,7 +173,7 @@ APPSPAWN_STATIC int AddPermissionBoolArrayToValue(cJSON *arrayItem, UserEncap *e APPSPAWN_CHECK(value != NULL, return APPSPAWN_SYSTEM_ERROR, "Failed to calloc bool array value"); cJSON *arrayItemTemp = arrayItem; - for (int index = 0; index < arraySize; index++) { + for (size_t index = 0; index < arraySize; index++) { if (arrayItemTemp == NULL || !cJSON_IsBool(arrayItemTemp)) { free(value); APPSPAWN_LOGE("Invalid bool array item type"); -- Gitee