From ff1f6a0166a230194dc29cacd54e299b2a45f6ba Mon Sep 17 00:00:00 2001 From: Sukhikh Alexander Date: Tue, 7 Feb 2023 13:48:17 +0300 Subject: [PATCH 1/3] Fix return nothing from non-void function Change-Id: If8fdc587a70ca631124aab0536d617a45bb91900 Signed-off-by: Sukhikh Alexander --- .../unittest/posix/src/fs/api/posix_fs_opendir_test.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/testsuites/unittest/posix/src/fs/api/posix_fs_opendir_test.c b/testsuites/unittest/posix/src/fs/api/posix_fs_opendir_test.c index 78cd71fa..29522a81 100644 --- a/testsuites/unittest/posix/src/fs/api/posix_fs_opendir_test.c +++ b/testsuites/unittest/posix/src/fs/api/posix_fs_opendir_test.c @@ -40,7 +40,7 @@ LITE_TEST_CASE(PosixFsFuncTestSuite, TestFsOpendirOK, Function | MediumTest | Le int32_t ret; DIR *dir = opendir(TEST_ROOT); - ICUNIT_ASSERT_NOT_EQUAL_VOID(dir, NULL, dir); + ICUNIT_ASSERT_NOT_EQUAL(dir, NULL, dir); ret = closedir(dir); ICUNIT_ASSERT_NOT_EQUAL(ret, POSIX_FS_IS_ERROR, ret); @@ -57,7 +57,7 @@ LITE_TEST_CASE(PosixFsFuncTestSuite, TestFsOpendirEINVAL, Function | MediumTest { DIR *dir = opendir(NULL); ICUNIT_ASSERT_EQUAL(errno, EINVAL, POSIX_FS_IS_ERROR); - ICUNIT_ASSERT_EQUAL_VOID(dir, NULL, dir); + ICUNIT_ASSERT_EQUAL(dir, NULL, dir); return POSIX_FS_NO_ERROR; } @@ -76,8 +76,7 @@ LITE_TEST_CASE(PosixFsFuncTestSuite, TestFsOpendirENOENT, Function | MediumTest dir = opendir(TEST_ROOT); g_mountPoints = mountBak; ICUNIT_ASSERT_EQUAL(errno, ENOENT, POSIX_FS_IS_ERROR); - ICUNIT_ASSERT_EQUAL_VOID(dir, NULL, dir); - + ICUNIT_ASSERT_EQUAL(dir, NULL, dir); return POSIX_FS_NO_ERROR; } -- Gitee From 750658bfd967dbbf7081894829f5bcbc10092cc9 Mon Sep 17 00:00:00 2001 From: Sukhikh Alexander Date: Tue, 7 Feb 2023 13:48:35 +0300 Subject: [PATCH 2/3] Add config file for clang Change-Id: I07ccf149456f5617a8af7da3d85fd956c1d8c481 Signed-off-by: Sukhikh Alexander --- liteos.gni | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/liteos.gni b/liteos.gni index 4a10574d..e4dd16af 100644 --- a/liteos.gni +++ b/liteos.gni @@ -33,6 +33,10 @@ LITEOS_MENUCONFIG_H = rebase_path("$root_out_dir/config.h") liteos_config_file = "${ohos_build_type}.config" +if(board_toolchain_type == "clang") { + liteos_config_file = "clang-${liteos_config_file}" +} + liteos_config_file = rebase_path(liteos_config_file, "", "$product_path/kernel_configs") print("liteos_config_file:", liteos_config_file) -- Gitee From b837788f94d2c934f33bb5e754d6673a411b7759 Mon Sep 17 00:00:00 2001 From: Sukhikh Alexander Date: Tue, 21 Feb 2023 11:10:31 +0300 Subject: [PATCH 3/3] format file Change-Id: If100337c917d40a19ba1177f58a82dbe5451b73f Signed-off-by: Sukhikh Alexander --- liteos.gni | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/liteos.gni b/liteos.gni index e4dd16af..4a219c89 100644 --- a/liteos.gni +++ b/liteos.gni @@ -33,7 +33,7 @@ LITEOS_MENUCONFIG_H = rebase_path("$root_out_dir/config.h") liteos_config_file = "${ohos_build_type}.config" -if(board_toolchain_type == "clang") { +if (board_toolchain_type == "clang") { liteos_config_file = "clang-${liteos_config_file}" } @@ -167,8 +167,8 @@ set_defaults("kernel_module") { "$LITEOSTOPDIR:los_config", ] visibility = [ - "$LITEOSTOPDIR:*", ":*", + "$LITEOSTOPDIR:*", "..:*", "../..:*", ] -- Gitee