diff --git a/aafwk_lite/ability_posix/src/AbilityMgrTest.cpp b/aafwk_lite/ability_posix/src/AbilityMgrTest.cpp index ae19a276860f39fb4748cb94eca455c457e1e1b7..5b0865a984a8cc17a5a7b40cffda9f3b0492a2fb 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 d0b52ee8ca9d3dbed48fc5e4388a22db9568d406..d40fab327e849aef85fe7ca2ce452facf53b9e44 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 6c45f42034b3674263791db622a1e932e94ce8c3..9c44d3488f342d34c04b69719d16500cd32a9f63 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) {