[git commit] nptl: fix gcc noreturn warning

Mike Frysinger vapier at gentoo.org
Sun Nov 18 09:52:01 UTC 2012


commit: http://git.uclibc.org/uClibc/commit/?id=e63f98ff27516982c294ec05d9de95bfd72863dd
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

Current builds show the warning:
  CC libpthread/nptl/pthread_create.os
libpthread/nptl/pthread_create.c: In function 'start_thread':
libpthread/nptl/pthread_create.c:418:3: warning: function declared
	'noreturn' has a 'return' statement [enabled by default]
libpthread/nptl/pthread_create.c:418:3: warning: 'noreturn' function
	does return [enabled by default]

Looking at glibc, it does not mark this function as noreturn.  Testing
code size, gcc is smart enough to detect the code never actually returns
regardless of the attribute.  So drop it to keep in sync with glibc and
to avoid the warnings.

Signed-off-by: Mike Frysinger <vapier at gentoo.org>
---
 libpthread/nptl/pthread_create.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libpthread/nptl/pthread_create.c b/libpthread/nptl/pthread_create.c
index 695d1a9..b3bf475 100644
--- a/libpthread/nptl/pthread_create.c
+++ b/libpthread/nptl/pthread_create.c
@@ -221,7 +221,7 @@ __free_tcb (struct pthread *pd)
 }
 
 
-static int attribute_noreturn
+static int
 start_thread (void *arg)
 {
   struct pthread *pd = (struct pthread *) arg;


More information about the uClibc-cvs mailing list