]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
thread: pacify gcc -Wsuggest-attribute=noreturn
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 25 Apr 2026 16:40:41 +0000 (09:40 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 25 Apr 2026 16:42:17 +0000 (09:42 -0700)
* lib/glthread/thread.c (gl_thread_create):
When threading is disabled, this function is _Noreturn.

ChangeLog
lib/glthread/thread.c

index 01b67ea0ae8e0c191754715ca0510fe41a3e50d2..79543f03c39faffcb6ea3794607e12823906cdb6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2026-04-25  Paul Eggert  <eggert@cs.ucla.edu>
+
+       thread: pacify gcc -Wsuggest-attribute=noreturn
+       * lib/glthread/thread.c (gl_thread_create):
+       When threading is disabled, this function is _Noreturn.
+
 2026-04-25  Bruno Haible  <bruno@clisp.org>
 
        regex: Remove misplaced comment.
index 8182c7fda825190b9ffc77fe9ed26be82c3752da..f08a28c0daccd4de6216d059f77813885931d546 100644 (file)
@@ -204,6 +204,10 @@ const gl_thread_t gl_null_thread /* = { .p = NULL } */;
 
 /* ========================================================================= */
 
+#if !(USE_ISOC_THREADS || USE_POSIX_THREADS || USE_ISOC_AND_POSIX_THREADS \
+      || USE_WINDOWS_THREADS)
+_Noreturn
+#endif
 gl_thread_t
 gl_thread_create (void *(*func) (void *arg), void *arg)
 {