[git commit] Add noreturn attributes to some functions that won't ever do so

Ron ron at debian.org
Fri Jun 26 19:14:18 UTC 2009


commit: http://git.uclibc.org/uClibc/commit/?id=c1040feea984d4bf8760da64b552bd22ee7a00c4
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/nptl


usage() is also made static in answer to warnings about no prototype.
In __pthread_manager_event() we also have to drop the return statement,
else gcc will in turn complain about a non-returning function having one.

Signed-off-by: Ron Lee <ron at debian.org>
Signed-off-by: Mike Frysinger <vapier at gentoo.org>
Signed-off-by: Austin Foxley <austinf at cetoncorp.com>
---
 libpthread/linuxthreads.old/manager.c |    4 ++--
 utils/ldconfig.c                      |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/libpthread/linuxthreads.old/manager.c b/libpthread/linuxthreads.old/manager.c
index 19be92f..0617d7d 100644
--- a/libpthread/linuxthreads.old/manager.c
+++ b/libpthread/linuxthreads.old/manager.c
@@ -248,7 +248,7 @@ int attribute_noreturn __pthread_manager(void *arg)
   }
 }
 
-int __pthread_manager_event(void *arg)
+int attribute_noreturn __pthread_manager_event(void *arg)
 {
   /* If we have special thread_self processing, initialize it.  */
 #ifdef INIT_THREAD_SELF
@@ -260,7 +260,7 @@ int __pthread_manager_event(void *arg)
   /* Free it immediately.  */
   __pthread_unlock (THREAD_GETMEM((&__pthread_manager_thread), p_lock));
 
-  return __pthread_manager(arg);
+  __pthread_manager(arg);
 }
 
 /* Process creation */
diff --git a/utils/ldconfig.c b/utils/ldconfig.c
index 0c53cab..2d4803b 100644
--- a/utils/ldconfig.c
+++ b/utils/ldconfig.c
@@ -141,7 +141,7 @@ static void warnx(const char *s, ...)
 	fprintf(stderr, "\n");
 }
 
-static void err(int errnum, const char *s, ...)
+static void attribute_noreturn err(int errnum, const char *s, ...)
 {
 	va_list p;
 
@@ -810,7 +810,7 @@ void cache_print(void)
 }
 #endif
 
-void usage(void)
+static void attribute_noreturn usage(void)
 {
 	fprintf(stderr,
 #ifdef __LDSO_CACHE_SUPPORT__
-- 
1.6.3.3


More information about the uClibc-cvs mailing list