]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Avoid some clang -Wthread-safety-analysis warnings.
authorBruno Haible <bruno@clisp.org>
Sun, 4 May 2025 15:31:11 +0000 (17:31 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 4 May 2025 16:44:22 +0000 (18:44 +0200)
* gettext-tools/src/x-typescript-impl.h (sbru_init): Declare with
_GL_ATTRIBUTE_ACQUIRE_CAPABILITY.
(sbru_xdupfree_c): Declare with _GL_ATTRIBUTE_RELEASE_CAPABILITY.

gettext-tools/src/x-typescript-impl.h

index a27d40f01b4d86972acd7448564540e48a698e6e..a5f54985742f8715c789b0bc3a05f840dd443f7f 100644 (file)
@@ -309,6 +309,9 @@ struct string_buffer_reversed_unicode
 
 /* Initializes a 'struct string_buffer_reversed_unicode'.  */
 static inline void
+sbru_init (struct string_buffer_reversed_unicode *buffer)
+  _GL_ATTRIBUTE_ACQUIRE_CAPABILITY (buffer->sbr.data);
+static inline void
 sbru_init (struct string_buffer_reversed_unicode *buffer)
 {
   sbr_init (&buffer->sbr);
@@ -432,7 +435,8 @@ sbru_xprepend_unicode (struct string_buffer_reversed_unicode *buffer,
 static char *
 sbru_xdupfree_c (struct string_buffer_reversed_unicode *buffer)
   _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE
-  _GL_ATTRIBUTE_RETURNS_NONNULL;
+  _GL_ATTRIBUTE_RETURNS_NONNULL
+  _GL_ATTRIBUTE_RELEASE_CAPABILITY (buffer->sbr.data);
 static char *
 sbru_xdupfree_c (struct string_buffer_reversed_unicode *buffer)
 {