diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2011-03-20 02:38:48 +0100 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2012-06-15 14:00:29 +0200 |
commit | e9af4dfbd328e9f3bba235fdb2d1027dd2dbbcde (patch) | |
tree | 809a8b87c681a241920f31b6a72ec572fe1d0058 | |
parent | 293173f87072bbc0cafc457d5d8a6039f4d1d259 (diff) |
fix a bunch of build warnings
Added attribute_noreturn even if it has return at the end of function
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
-rw-r--r-- | libc/inet/resolv.c | 6 | ||||
-rw-r--r-- | libpthread/nptl/cleanup_routine.c | 2 | ||||
-rw-r--r-- | libpthread/nptl/pt-cleanup.c | 2 | ||||
-rw-r--r-- | libpthread/nptl/pthread_create.c | 2 | ||||
-rw-r--r-- | libpthread/nptl/pthread_exit.c | 2 | ||||
-rw-r--r-- | libpthread/nptl/pthread_getspecific.c | 2 | ||||
-rw-r--r-- | libpthread/nptl/sysdeps/pthread/pthread.h | 1 | ||||
-rw-r--r-- | libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c | 2 | ||||
-rw-r--r-- | libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c | 2 | ||||
-rw-r--r-- | libpthread/nptl/unwind.c | 4 |
10 files changed, 14 insertions, 11 deletions
diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c index b4246d377..692991f94 100644 --- a/libc/inet/resolv.c +++ b/libc/inet/resolv.c @@ -3532,7 +3532,7 @@ __res_vinit(res_state rp, int preinit) return 0; } -static void +static void attribute_noreturn __res_iclose(void) { __UCLIBC_MUTEX_LOCK(__resolv_lock); @@ -3551,7 +3551,9 @@ __res_iclose(void) } #endif memset(&_res, 0, sizeof(_res)); - __UCLIBC_MUTEX_UNLOCK(__resolv_lock); + /* the loop is only to make gcc happy */ + while(1) + __UCLIBC_MUTEX_UNLOCK(__resolv_lock); } /* diff --git a/libpthread/nptl/cleanup_routine.c b/libpthread/nptl/cleanup_routine.c index cbf231834..54badf094 100644 --- a/libpthread/nptl/cleanup_routine.c +++ b/libpthread/nptl/cleanup_routine.c @@ -19,7 +19,7 @@ #include <pthread.h> - +void __pthread_cleanup_routine (struct __pthread_cleanup_frame *f); void __pthread_cleanup_routine (struct __pthread_cleanup_frame *f) { diff --git a/libpthread/nptl/pt-cleanup.c b/libpthread/nptl/pt-cleanup.c index d7394ae44..aa0b9bbd9 100644 --- a/libpthread/nptl/pt-cleanup.c +++ b/libpthread/nptl/pt-cleanup.c @@ -23,7 +23,7 @@ #include <jmpbuf-unwind.h> void -attribute_protected +/*does not apply due to hidden_proto(): attribute_protected*/ __pthread_cleanup_upto (__jmp_buf target, char *targetframe) { struct pthread *self = THREAD_SELF; diff --git a/libpthread/nptl/pthread_create.c b/libpthread/nptl/pthread_create.c index b3bf47530..695d1a97d 100644 --- a/libpthread/nptl/pthread_create.c +++ b/libpthread/nptl/pthread_create.c @@ -221,7 +221,7 @@ __free_tcb (struct pthread *pd) } -static int +static int attribute_noreturn start_thread (void *arg) { struct pthread *pd = (struct pthread *) arg; diff --git a/libpthread/nptl/pthread_exit.c b/libpthread/nptl/pthread_exit.c index 88d3859b7..98f67f245 100644 --- a/libpthread/nptl/pthread_exit.c +++ b/libpthread/nptl/pthread_exit.c @@ -22,7 +22,7 @@ void -attribute_protected +attribute_protected attribute_noreturn __pthread_exit (void* value) { THREAD_SETMEM (THREAD_SELF, result, value); diff --git a/libpthread/nptl/pthread_getspecific.c b/libpthread/nptl/pthread_getspecific.c index 639a4fdeb..a00fe0bfc 100644 --- a/libpthread/nptl/pthread_getspecific.c +++ b/libpthread/nptl/pthread_getspecific.c @@ -21,8 +21,8 @@ #include "pthreadP.h" -void * attribute_protected +void * __pthread_getspecific (pthread_key_t key) { struct pthread_key_data *data; diff --git a/libpthread/nptl/sysdeps/pthread/pthread.h b/libpthread/nptl/sysdeps/pthread/pthread.h index 98c84aeaf..1ebf1300d 100644 --- a/libpthread/nptl/sysdeps/pthread/pthread.h +++ b/libpthread/nptl/sysdeps/pthread/pthread.h @@ -581,6 +581,7 @@ class __pthread_cleanup_class function the compiler is free to decide inlining the change when needed or fall back on the copy which must exist somewhere else. */ +void __pthread_cleanup_routine (struct __pthread_cleanup_frame *__frame); __extern_inline void __pthread_cleanup_routine (struct __pthread_cleanup_frame *__frame) { diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c b/libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c index 188040ee8..91d40a3be 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c @@ -111,7 +111,7 @@ notification_function (void *arg) /* Helper thread. */ -static void * +static attribute_noreturn void * helper_thread (void *arg) { while (1) diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c b/libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c index 4319d8dbe..1664af5cf 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c @@ -69,7 +69,7 @@ timer_sigev_thread (void *arg) /* Helper function to support starting threads for SIGEV_THREAD. */ -static void * +static attribute_noreturn void * timer_helper_thread (void *arg) { /* Wait for the SIGTIMER signal, allowing the setXid signal, and diff --git a/libpthread/nptl/unwind.c b/libpthread/nptl/unwind.c index 671d70208..39528854c 100644 --- a/libpthread/nptl/unwind.c +++ b/libpthread/nptl/unwind.c @@ -99,7 +99,7 @@ unwind_stop (int version, _Unwind_Action actions, } -static void +static attribute_noreturn void unwind_cleanup (_Unwind_Reason_Code reason, struct _Unwind_Exception *exc) { /* When we get here a C++ catch block didn't rethrow the object. We @@ -115,7 +115,7 @@ unwind_cleanup (_Unwind_Reason_Code reason, struct _Unwind_Exception *exc) void -attribute_protected +/*does not apply due to hidden_proto(): attribute_protected*/ __cleanup_fct_attribute __attribute ((noreturn)) #if !defined SHARED && !defined IS_IN_libpthread weak_function |