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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user