From 9d0f293b68e5d7bbfa925ecace5068e41855a4ac Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 7 Jan 2023 22:01:06 -0800 Subject: imx-seco-libs: Fix build with clang Signed-off-by: Khem Raj --- .../0001-Fix-return-value-of-void-functions.patch | 57 ++++++++++++++++++++++ recipes-bsp/imx-seco/imx-seco-libs_git.bb | 3 +- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 recipes-bsp/imx-seco/imx-seco-libs/0001-Fix-return-value-of-void-functions.patch diff --git a/recipes-bsp/imx-seco/imx-seco-libs/0001-Fix-return-value-of-void-functions.patch b/recipes-bsp/imx-seco/imx-seco-libs/0001-Fix-return-value-of-void-functions.patch new file mode 100644 index 000000000..656469c2e --- /dev/null +++ b/recipes-bsp/imx-seco/imx-seco-libs/0001-Fix-return-value-of-void-functions.patch @@ -0,0 +1,57 @@ +From 2eff97fe2345d8255869224404322d23193f1115 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 7 Jan 2023 21:59:15 -0800 +Subject: [PATCH] Fix return value of void* functions + +This is found with clang + +Fixes +error: non-void function does not return a value [-Werror,-Wreturn-type] + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + test/hsm/hsm_test.c | 1 + + test/she/src/she_test_storage_manager.c | 1 + + test/v2x/v2x_test.c | 1 + + 3 files changed, 3 insertions(+) + +diff --git a/test/hsm/hsm_test.c b/test/hsm/hsm_test.c +index 9f29ca9..01820b8 100644 +--- a/test/hsm/hsm_test.c ++++ b/test/hsm/hsm_test.c +@@ -391,6 +391,7 @@ static uint32_t nvm_status; + static void *hsm_storage_thread(void *arg) + { + seco_nvm_manager(NVM_FLAGS_HSM, &nvm_status); ++ return 0; + } + + +diff --git a/test/she/src/she_test_storage_manager.c b/test/she/src/she_test_storage_manager.c +index 32a4cb9..68cdba7 100644 +--- a/test/she/src/she_test_storage_manager.c ++++ b/test/she/src/she_test_storage_manager.c +@@ -28,6 +28,7 @@ static uint32_t nvm_status; + static void *she_storage_thread(void *arg) + { + seco_nvm_manager(NVM_FLAGS_SHE, &nvm_status); ++ return 0; + } + + +diff --git a/test/v2x/v2x_test.c b/test/v2x/v2x_test.c +index aeb3d2a..5f02354 100644 +--- a/test/v2x/v2x_test.c ++++ b/test/v2x/v2x_test.c +@@ -181,6 +181,7 @@ static uint32_t nvm_status; + static void *v2x_hsm_storage_thread(void *arg) + { + seco_nvm_manager(NVM_FLAGS_V2X | NVM_FLAGS_HSM, &nvm_status); ++ return 0; + } + + +-- +2.39.0 + diff --git a/recipes-bsp/imx-seco/imx-seco-libs_git.bb b/recipes-bsp/imx-seco/imx-seco-libs_git.bb index 625834b7b..9b2509759 100644 --- a/recipes-bsp/imx-seco/imx-seco-libs_git.bb +++ b/recipes-bsp/imx-seco/imx-seco-libs_git.bb @@ -12,7 +12,8 @@ SRCBRANCH = "imx_5.4.70_2.3.9" SRC_URI = "git://github.com/NXP/imx-seco-libs.git;protocol=https;branch=${SRCBRANCH} \ file://0001-Makefile-Fix-LIBDIR-for-multilib.patch \ file://0002-Makefile-Fix-install-to-clear-host-user-contaminated.patch \ - file://0001-add-v2x_test-to-the-installed-binaries.patch" + file://0001-add-v2x_test-to-the-installed-binaries.patch \ + file://0001-Fix-return-value-of-void-functions.patch" SRCREV = "b2550476388e1d1453bddbf356844301467c7bfa" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf