From fed43f4f385c6b94f5f0276c432781aa68db077c Mon Sep 17 00:00:00 2001 From: Laowang-BearPi Date: Tue, 29 Mar 2022 09:30:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Daafwk=5Flite=20appexecfwk=5Fl?= =?UTF-8?q?ite=20security=5Flite=20=20=E7=BC=96=E8=AF=91=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Laowang-BearPi --- aafwk_lite/ability_posix/src/AbilityMgrTest.cpp | 2 +- appexecfwk_lite/appexecfwk_posix/src/BundleMgrTest.cpp | 3 ++- .../permission_posix/capability/src/ActsCapabilityTest.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/aafwk_lite/ability_posix/src/AbilityMgrTest.cpp b/aafwk_lite/ability_posix/src/AbilityMgrTest.cpp index ae19a2768..5b0865a98 100755 --- a/aafwk_lite/ability_posix/src/AbilityMgrTest.cpp +++ b/aafwk_lite/ability_posix/src/AbilityMgrTest.cpp @@ -105,7 +105,7 @@ static void OnAbilityConnectDone(ElementName *elementName, SvcIdentity *serviceS sem_post(&g_sem); } -static void OnAbilityDisconnectDone(ElementName (void)*elementName, int resultCode, void *storeData) +static void OnAbilityDisconnectDone(ElementName *elementName, int resultCode, void *storeData) { printf("OnAbilityDisconnectDone\n"); } diff --git a/appexecfwk_lite/appexecfwk_posix/src/BundleMgrTest.cpp b/appexecfwk_lite/appexecfwk_posix/src/BundleMgrTest.cpp index d0b52ee8c..d40fab327 100755 --- a/appexecfwk_lite/appexecfwk_posix/src/BundleMgrTest.cpp +++ b/appexecfwk_lite/appexecfwk_posix/src/BundleMgrTest.cpp @@ -52,7 +52,8 @@ static void TestBundleStateCallback(const uint8_t resultCode, const void *result static string GetCurDir() { string filePath = ""; - if (!(char *buffer = getcwd(NULL, 0))) { + char *buffer; + if ((buffer = getcwd(NULL, 0)) == NULL) { perror("get file path error"); } else { printf("Current Dir: %s\r\n", buffer); diff --git a/security_lite/permission_posix/capability/src/ActsCapabilityTest.cpp b/security_lite/permission_posix/capability/src/ActsCapabilityTest.cpp index 6c45f4203..9c44d3488 100644 --- a/security_lite/permission_posix/capability/src/ActsCapabilityTest.cpp +++ b/security_lite/permission_posix/capability/src/ActsCapabilityTest.cpp @@ -453,7 +453,7 @@ static int CapgetWithVersion(pid_t pid, unsigned int version) } #endif -#if (defined(_BOARD_HI3516_) && defined(LITE_FS_VFAT)) || +#if (defined(_BOARD_HI3516_) && defined(LITE_FS_VFAT)) || \ (!defined(_BOARD_HI3516_) && (defined(LITE_FS_JFFS2) || defined(LITE_FS_VFAT))) static int CapgetWithCaps(pid_t pid, unsigned int caps) { -- GitLab