]> Savannah Git Hosting - gnulib.git/commitdiff
threads-h tests: Fix gcc -Wold-style-declaration warning.
authorBruno Haible <bruno@clisp.org>
Mon, 4 Sep 2023 14:39:07 +0000 (16:39 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 14 Sep 2023 10:10:04 +0000 (12:10 +0200)
* tests/test-thread_local.c (value0, value1, value2, value3): Put the
'thread_local' storage class specifier before the type.

ChangeLog
tests/test-thread_local.c

index d4af58378f6687d59e47bd1fe3b367157adeba88..bf44c670fc7fa907116d656cc3d9be00dbd8211e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2023-09-04  Bruno Haible  <bruno@clisp.org>
 
+       threads-h tests: Fix gcc -Wold-style-declaration warning.
+       * tests/test-thread_local.c (value0, value1, value2, value3): Put the
+       'thread_local' storage class specifier before the type.
+
        ieee754-h tests: Fix some gcc -Wmissing-field-initializers warnings.
        * tests/test-ieee754-h.c (float_tests): Use float literals.
        (double_tests): Use double literals. Initialize frac_lo.
index c30ad10238adea8df3324daa76399e3142ec2153..28536535fff1f96f42b9aefbcb1043d8c92988dd 100644 (file)
@@ -84,10 +84,10 @@ perhaps_yield (void)
 /* ----------------------- Test thread-local storage ----------------------- */
 
 #define KEYS_COUNT 4
-static unsigned int thread_local value0;
-static unsigned int thread_local value1;
-static unsigned int thread_local value2;
-static unsigned int thread_local value3;
+static thread_local unsigned int value0;
+static thread_local unsigned int value1;
+static thread_local unsigned int value2;
+static thread_local unsigned int value3;
 
 static int
 worker_thread (void *arg)