Преглед на файлове

Add noreturn attributes to some functions that won't ever do so

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>
Ron преди 15 години
родител
ревизия
5efcfdc515
променени са 2 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 2 2
      libpthread/linuxthreads.old/manager.c
  2. 2 2
      utils/ldconfig.c

+ 2 - 2
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 */

+ 2 - 2
utils/ldconfig.c

@@ -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__