]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
tst-atexit-common.c: Mark _exit_with_flush as noreturn
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 16 Dec 2024 21:51:07 +0000 (05:51 +0800)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 17 Dec 2024 17:54:26 +0000 (01:54 +0800)
Mark _exit_with_flush as noreturn to silence the Clang error on
tst-atexit-common.c:

In file included from tst-atexit.c:22:
../stdlib/tst-atexit-common.c:113:5: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
  113 |     case 0:  /* Child.  */
      |     ^
../stdlib/tst-atexit-common.c:113:5: note: insert 'break;' to avoid fall-through
  113 |     case 0:  /* Child.  */
      |     ^
      |     break;
1 error generated.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
stdlib/tst-atexit-common.c

index 4bea464b191ac07a647446d0519197a72d0bb05a..f77ccbbd0d26d1179992596a191fb131da887d7e 100644 (file)
@@ -37,6 +37,7 @@ static char crumbs[sizeof (expected)];
 static int next_slot = 0;
 
 /* Helper: flush stdout and _exit.  */
+__attribute__ ((__noreturn__))
 static void
 _exit_with_flush (int code)
 {