]> git.ipfire.org Git - thirdparty/glibc.git/commit
tst-clone3[-internal].c: Add _Atomic to silence Clang
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 16 Dec 2024 21:54:19 +0000 (05:54 +0800)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 17 Dec 2024 17:54:26 +0000 (01:54 +0800)
commitd4ee46b0cd43012d311e07f11ee960efec3f1a94
treea1dfa9909d3a67e143b51b7589f690da983b3e12
parent560cfeb82693912723ff0e11232c86f9b492a1a0
tst-clone3[-internal].c: Add _Atomic to silence Clang

Add _Atomic to futex_wait argument and ctid in tst-clone3[-internal].c to
silence Clang error:

../sysdeps/unix/sysv/linux/tst-clone3-internal.c:93:3: error: address argument to atomic operation must be a pointer to _Atomic type ('pid_t *' (aka 'int *') invalid)
   93 |   wait_tid (&ctid, CTID_INIT_VAL);
      |   ^         ~~~~~
../sysdeps/unix/sysv/linux/tst-clone3-internal.c:51:21: note: expanded from macro 'wait_tid'
   51 |     while ((__tid = atomic_load_explicit (ctid_ptr,                     \
      |                     ^                     ~~~~~~~~
/usr/bin/../lib/clang/19/include/stdatomic.h:145:30: note: expanded from macro 'atomic_load_explicit'
  145 | #define atomic_load_explicit __c11_atomic_load
      |                              ^

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
sysdeps/unix/sysv/linux/tst-clone3-internal.c
sysdeps/unix/sysv/linux/tst-clone3.c