Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/usr.bin/xlint/lint1 Add one more test
details: https://anonhg.NetBSD.org/src/rev/df2ecb542a62
branches: trunk
changeset: 333888:df2ecb542a62
user: christos <christos%NetBSD.org@localhost>
date: Thu Nov 20 20:52:15 2014 +0000
description:
Add one more test
diffstat:
tests/usr.bin/xlint/lint1/Makefile | 3 ++-
tests/usr.bin/xlint/lint1/d_c99_nested_struct.c | 25 +++++++++++++++++++++++++
2 files changed, 27 insertions(+), 1 deletions(-)
diffs (46 lines):
diff -r e3aecb6e11eb -r df2ecb542a62 tests/usr.bin/xlint/lint1/Makefile
--- a/tests/usr.bin/xlint/lint1/Makefile Thu Nov 20 20:49:06 2014 +0000
+++ b/tests/usr.bin/xlint/lint1/Makefile Thu Nov 20 20:52:15 2014 +0000
@@ -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_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
diff -r e3aecb6e11eb -r df2ecb542a62 tests/usr.bin/xlint/lint1/d_c99_nested_struct.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_nested_struct.c Thu Nov 20 20:52:15 2014 +0000
@@ -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) },
+};
Home |
Main Index |
Thread Index |
Old Index