]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
drd/tests/swapcontext.c: Rename typedef struct thread_local to threadlocal
authorMark Wielaard <mark@klomp.org>
Sat, 23 Nov 2024 21:48:03 +0000 (22:48 +0100)
committerMark Wielaard <mark@klomp.org>
Sat, 23 Nov 2024 22:15:53 +0000 (23:15 +0100)
Since C23 thread_local is a keyword (thread storage duration).

swapcontext.c:23:16: error: expected '{' before 'thread_local'
   23 | typedef struct thread_local {
      |                ^~~~~~~~~~~~
swapcontext.c:23:16: warning: 'thread_local' is not at beginning of declaration [-Wold-style-declaration]
swapcontext.c:23:16: error: 'thread_local' used with 'typedef'
swapcontext.c:26:3: warning: data definition has no type or storage class
   26 | } thread_local_t;
      |   ^~~~~~~~~~~~~~

drd/tests/swapcontext.c

index 2cb969a5eafa4a55624cf34bc545f8cafc9a775a..ec191968cab17c407c058b4399fbdb4da700ce6d 100644 (file)
@@ -20,7 +20,7 @@
 
 #define STACKSIZE (PTHREAD_STACK_MIN + 4096)
 
-typedef struct thread_local {
+typedef struct threadlocal {
   ucontext_t uc[3];
   size_t nrsw;
 } thread_local_t;