diff --git a/appexecfwk_lite/appexecfwk_posix/src/BundleMgrTest.cpp b/appexecfwk_lite/appexecfwk_posix/src/BundleMgrTest.cpp index dd2ef6b512a2569a12be33e2c40307ea3c6fb0c7..39d7092bcbbd058070db7d9df0257937cfbed79b 100755 --- a/appexecfwk_lite/appexecfwk_posix/src/BundleMgrTest.cpp +++ b/appexecfwk_lite/appexecfwk_posix/src/BundleMgrTest.cpp @@ -32,7 +32,7 @@ static sem_t g_sem; static string g_testPath; extern "C" { -void __attribute__((weak)) HOS_SystemInit(void){} + void __attribute__((weak)) HOS_SystemInit(void){} } /* callback */ @@ -52,8 +52,7 @@ static void TestBundleStateCallback(const uint8_t resultCode, const void *result static string GetCurDir() { string filePath = ""; - char *buffer; - if (!(buffer = getcwd(NULL, 0))) { + if (!(char *buffer = getcwd(NULL, 0))) { perror("get file path error"); } else { printf("Current Dir: %s\r\n", buffer);