Module Name: src Committed By: christos Date: Thu Nov 20 20:52:15 UTC 2014
Modified Files: src/tests/usr.bin/xlint/lint1: Makefile Added Files: src/tests/usr.bin/xlint/lint1: d_c99_nested_struct.c Log Message: Add one more test To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/Makefile cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/d_c99_nested_struct.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/usr.bin/xlint/lint1/Makefile diff -u src/tests/usr.bin/xlint/lint1/Makefile:1.3 src/tests/usr.bin/xlint/lint1/Makefile:1.4 --- src/tests/usr.bin/xlint/lint1/Makefile:1.3 Thu Apr 17 14:34:44 2014 +++ src/tests/usr.bin/xlint/lint1/Makefile Thu Nov 20 15:52:15 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2014/04/17 18:34:44 christos Exp $ +# $NetBSD: Makefile,v 1.4 2014/11/20 20:52:15 christos Exp $ NOMAN= # defined @@ -19,6 +19,7 @@ FILES+= d_c99_for_loops.c FILES+= d_c99_func.c FILES+= d_c99_recursive_init.c FILES+= d_c99_struct_init.c +FILES+= d_c99_nested_struct.c FILES+= d_c99_union_init1.c FILES+= d_c99_union_init2.c FILES+= d_c99_union_init3.c Added files: Index: src/tests/usr.bin/xlint/lint1/d_c99_nested_struct.c diff -u /dev/null src/tests/usr.bin/xlint/lint1/d_c99_nested_struct.c:1.1 --- /dev/null Thu Nov 20 15:52:15 2014 +++ src/tests/usr.bin/xlint/lint1/d_c99_nested_struct.c Thu Nov 20 15:52:15 2014 @@ -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) }, +};