xref: /minix3/tests/usr.bin/xlint/lint1/d_c99_nested_struct.c (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc /* C99 nested struct init with named and non-named initializers */
2*0a6a1f1dSLionel Sambuc typedef struct pthread_mutex_t {
3*0a6a1f1dSLionel Sambuc  unsigned int ptm_magic;
4*0a6a1f1dSLionel Sambuc  char ptm_errorcheck;
5*0a6a1f1dSLionel Sambuc 
6*0a6a1f1dSLionel Sambuc  char ptm_pad1[3];
7*0a6a1f1dSLionel Sambuc 
8*0a6a1f1dSLionel Sambuc  char ptm_interlock;
9*0a6a1f1dSLionel Sambuc 
10*0a6a1f1dSLionel Sambuc  char ptm_pad2[3];
11*0a6a1f1dSLionel Sambuc 
12*0a6a1f1dSLionel Sambuc  volatile void * ptm_owner;
13*0a6a1f1dSLionel Sambuc  void * volatile ptm_waiters;
14*0a6a1f1dSLionel Sambuc  unsigned int ptm_recursed;
15*0a6a1f1dSLionel Sambuc  void *ptm_spare2;
16*0a6a1f1dSLionel Sambuc } pthread_mutex_t;
17*0a6a1f1dSLionel Sambuc 
18*0a6a1f1dSLionel Sambuc 
19*0a6a1f1dSLionel Sambuc struct arc4random_global {
20*0a6a1f1dSLionel Sambuc 
21*0a6a1f1dSLionel Sambuc  pthread_mutex_t lock;
22*0a6a1f1dSLionel Sambuc } arc4random_global = {
23*0a6a1f1dSLionel Sambuc 
24*0a6a1f1dSLionel Sambuc  .lock = { 0x33330003, 0, { 0, 0, 0 }, 0, { 0, 0, 0 }, ((void *)0), ((void *)0), 0, ((void *)0) },
25*0a6a1f1dSLionel Sambuc };
26