diff options
Diffstat (limited to 'contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_nested_struct.c')
-rw-r--r-- | contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_nested_struct.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_nested_struct.c b/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_nested_struct.c new file mode 100644 index 000000000000..15410c899739 --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_nested_struct.c @@ -0,0 +1,25 @@ +/* C99 nested struct init with named and non-named initializers */ +typedef struct pthread_mutex_t { + unsigned int ptm_magic; + char ptm_errorcheck; + + char ptm_pad1[3]; + + char ptm_interlock; + + char ptm_pad2[3]; + + volatile void * ptm_owner; + void * volatile ptm_waiters; + unsigned int ptm_recursed; + void *ptm_spare2; +} pthread_mutex_t; + + +struct arc4random_global { + + pthread_mutex_t lock; +} arc4random_global = { + + .lock = { 0x33330003, 0, { 0, 0, 0 }, 0, { 0, 0, 0 }, ((void *)0), ((void *)0), 0, ((void *)0) }, +}; |