From dff3f62071ea1961857c04a0b66ddf70e9e65d4b Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Wed, 7 Apr 2010 18:27:34 +0000 Subject: [PATCH] pthread_exit() cannot return, but the "noreturn" attribute is really a compiler feature (which we haven't set yet). So return some dummy value. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36068 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../conformance/interfaces/pthread_cond_timedwait/2-2.c | 2 ++ .../conformance/interfaces/pthread_cond_timedwait/2-3.c | 2 ++ .../conformance/interfaces/pthread_key_create/1-2.c | 1 + .../conformance/interfaces/pthread_key_create/3-1.c | 1 + .../conformance/interfaces/pthread_mutexattr_settype/3-2.c | 1 + 5 files changed, 7 insertions(+) diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/pthread_cond_timedwait/2-2.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/pthread_cond_timedwait/2-2.c index a66aef4cf9..4825ff6f22 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/pthread_cond_timedwait/2-2.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/pthread_cond_timedwait/2-2.c @@ -72,6 +72,8 @@ void *t1_func(void *arg) fprintf(stderr,"Test FAILED: pthread_cond_timedwait return %d instead of ETIMEDOUT\n", rc); pthread_exit((void*)PTS_FAIL); } + + return NULL; } int main() diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/pthread_cond_timedwait/2-3.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/pthread_cond_timedwait/2-3.c index a2380f2c08..f887f6d0d0 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/pthread_cond_timedwait/2-3.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/pthread_cond_timedwait/2-3.c @@ -62,6 +62,8 @@ void *t1_func(void *arg) fprintf(stderr,"pthread_cond_timedwait return %d instead of ETIMEDOUT\n", rc); exit(PTS_FAIL); } + + return NULL; } int main() diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/pthread_key_create/1-2.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/pthread_key_create/1-2.c index ccf56a4c49..42c888bdce 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/pthread_key_create/1-2.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/pthread_key_create/1-2.c @@ -41,6 +41,7 @@ void *a_thread_func() } pthread_exit(0); + return NULL; } int main() diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/pthread_key_create/3-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/pthread_key_create/3-1.c index 56cb1f8cae..fae1cc3f12 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/pthread_key_create/3-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/pthread_key_create/3-1.c @@ -50,6 +50,7 @@ void *a_thread_func() /* The thread ends here, the destructor for the key should now be called after this */ pthread_exit(0); + return NULL; } int main() diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/pthread_mutexattr_settype/3-2.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/pthread_mutexattr_settype/3-2.c index c75db31404..a2c421b502 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/pthread_mutexattr_settype/3-2.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/pthread_mutexattr_settype/3-2.c @@ -42,6 +42,7 @@ void *a_thread_func() /* Try to unlock the mutex that main already locked. */ ret=pthread_mutex_unlock(&mutex); pthread_exit((void*)0); + return NULL; }