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

nptl: fix gcc noreturn warning

Current builds show the warning:
  CC libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.os
libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c: In function 'helper_thread':
libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c:142:3: warning:
	function declared 'noreturn' has a 'return' statement [enabled by default]

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

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger преди 11 години
родител
ревизия
dd0bd6be9d
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c

+ 1 - 1
libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c

@@ -111,7 +111,7 @@ notification_function (void *arg)
 
 
 /* Helper thread.  */
-static attribute_noreturn void *
+static void *
 helper_thread (void *arg)
 {
   while (1)