Signed-off-by: Khem Raj <raj.k...@gmail.com>
---
 ...Wincompatible-function-pointer-types.patch | 39 +++++++++++++++++++
 meta-oe/recipes-support/nspr/nspr_4.35.bb     |  1 +
 2 files changed, 40 insertions(+)
 create mode 100644 
meta-oe/recipes-support/nspr/nspr/0001-Fix-Wincompatible-function-pointer-types.patch

diff --git 
a/meta-oe/recipes-support/nspr/nspr/0001-Fix-Wincompatible-function-pointer-types.patch
 
b/meta-oe/recipes-support/nspr/nspr/0001-Fix-Wincompatible-function-pointer-types.patch
new file mode 100644
index 0000000000..8515075fe0
--- /dev/null
+++ 
b/meta-oe/recipes-support/nspr/nspr/0001-Fix-Wincompatible-function-pointer-types.patch
@@ -0,0 +1,39 @@
+From d24dc9bebaefbd8abf32707bad5efc0c811c0cd4 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.k...@gmail.com>
+Date: Wed, 18 Jan 2023 13:04:56 -0800
+Subject: [PATCH] Fix -Wincompatible-function-pointer-types
+
+Fixes warnings with clang16
+testfile.c:576:31: error: incompatible function pointer types passing 'PRInt32 
(void *)' (aka 'int (void *)') to parameter of type 'void (*)(void *)' 
[-Wincompatible-function-pointe r-types]
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.k...@gmail.com>
+---
+ pr/tests/testfile.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/pr/tests/testfile.c b/pr/tests/testfile.c
+index 79d8a05..42aa6a7 100644
+--- a/pr/tests/testfile.c
++++ b/pr/tests/testfile.c
+@@ -123,7 +123,7 @@ PRThread* create_new_thread(PRThreadType type,
+     if (native_thread) {
+ #if defined(_PR_PTHREADS)
+         pthread_t tid;
+-        if (!pthread_create(&tid, NULL, start, arg)) {
++        if (!pthread_create(&tid, NULL, (void*(*)(void*))start, arg)) {
+             return((PRThread *) tid);
+         }
+         else {
+@@ -573,7 +573,7 @@ static PRInt32 RunDirTest(void)
+ 
+         thrarg.done= 0;
+         t = create_new_thread(PR_USER_THREAD,
+-                              DirTest, &thrarg,
++                              (void (*)(void *))DirTest, &thrarg,
+                               PR_PRIORITY_NORMAL,
+                               PR_LOCAL_THREAD,
+                               PR_UNJOINABLE_THREAD,
+-- 
+2.39.1
+
diff --git a/meta-oe/recipes-support/nspr/nspr_4.35.bb 
b/meta-oe/recipes-support/nspr/nspr_4.35.bb
index c8cb618bc9..f8d329398b 100644
--- a/meta-oe/recipes-support/nspr/nspr_4.35.bb
+++ b/meta-oe/recipes-support/nspr/nspr_4.35.bb
@@ -12,6 +12,7 @@ SRC_URI = 
"http://ftp.mozilla.org/pub/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz
            file://0001-md-Fix-build-with-musl.patch \
            file://Makefile.in-remove-_BUILD_STRING-and-_BUILD_TIME.patch \
            file://0001-config-nspr-config.in-don-t-pass-LDFLAGS.patch \
+           file://0001-Fix-Wincompatible-function-pointer-types.patch \
            file://nspr.pc.in \
            "
 
-- 
2.39.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#100684): 
https://lists.openembedded.org/g/openembedded-devel/message/100684
Mute This Topic: https://lists.openembedded.org/mt/96439256/21656
Group Owner: openembedded-devel+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to