Specify the type in pthread initializers as well.

Otherwise it would be possible to do e.g.

`pthread_mutex_t mutex = PTHREAD_ONCE_INITIALIZER;```,
which would expand to
```pthread_mutex_t mutex = {0};```.
This commit is contained in:
4lDO2
2023-04-09 16:22:09 +02:00
parent b9f19f4326
commit f0d8b6fd31
+4 -4
View File
@@ -5,10 +5,10 @@ style = "type"
no_includes = true
cpp_compat = true
trailer = """
#define PTHREAD_COND_INITIALIZER {0}
#define PTHREAD_MUTEX_INITIALIZER {0}
#define PTHREAD_ONCE_INIT {0}
#define PTHREAD_RWLOCK_INITIALIZER {0}
#define PTHREAD_COND_INITIALIZER ((pthread_cond_t){0})
#define PTHREAD_MUTEX_INITIALIZER ((pthread_mutex_t){0})
#define PTHREAD_ONCE_INIT ((pthread_once_t){0})
#define PTHREAD_RWLOCK_INITIALIZER ((pthread_rwlock_t){0})
"""
[export.rename]