OSDN Git Service

Add noreturn attributes to some functions that won't ever do so
authorRon <ron@debian.org>
Fri, 26 Jun 2009 19:14:18 +0000 (04:44 +0930)
committerMike Frysinger <vapier@gentoo.org>
Mon, 6 Jul 2009 00:27:16 +0000 (20:27 -0400)
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@debian.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
libpthread/linuxthreads.old/manager.c
utils/ldconfig.c

index 19be92f..0617d7d 100644 (file)
@@ -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 */
index c52b170..f6aec5c 100644 (file)
@@ -114,7 +114,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;
 
@@ -783,7 +783,7 @@ void cache_print(void)
 }
 #endif
 
-void usage(void)
+static void attribute_noreturn usage(void)
 {
        fprintf(stderr,
 #ifdef __LDSO_CACHE_SUPPORT__