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 test for typename as a functio...



details:   https://anonhg.NetBSD.org/src/rev/1501f5760f65
branches:  trunk
changeset: 807272:1501f5760f65
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Apr 03 21:37:26 2015 +0000

description:
add test for typename as a function param

diffstat:

 tests/usr.bin/xlint/lint1/Makefile    |   3 ++-
 tests/usr.bin/xlint/lint1/d_typefun.c |  22 ++++++++++++++++++++++
 2 files changed, 24 insertions(+), 1 deletions(-)

diffs (43 lines):

diff -r 65fbb80e0ada -r 1501f5760f65 tests/usr.bin/xlint/lint1/Makefile
--- a/tests/usr.bin/xlint/lint1/Makefile        Fri Apr 03 20:01:07 2015 +0000
+++ b/tests/usr.bin/xlint/lint1/Makefile        Fri Apr 03 21:37:26 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2014/11/20 21:18:47 christos Exp $
+# $NetBSD: Makefile,v 1.6 2015/04/03 21:37:26 christos Exp $
 
 NOMAN=         # defined
 
@@ -52,6 +52,7 @@
 FILES+=                d_type_conv2.c
 FILES+=                d_type_conv3.c
 FILES+=                d_typename_as_var.c
+FILES+=                d_typefun.c
 FILES+=                d_zero_sized_arrays.c
 
 .include <bsd.test.mk>
diff -r 65fbb80e0ada -r 1501f5760f65 tests/usr.bin/xlint/lint1/d_typefun.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/usr.bin/xlint/lint1/d_typefun.c     Fri Apr 03 21:37:26 2015 +0000
@@ -0,0 +1,22 @@
+/* typedef of function parameter */
+
+typedef void (*free_func) (void * opaque, void* address);
+typedef struct stack_st
+{
+ int num;
+ char **data;
+ int sorted;
+
+ int num_alloc;
+ int (*comp)(const void *, const void *);
+} _STACK; /* Use STACK_OF(...) instead */
+
+typedef void *OPENSSL_BLOCK;
+struct stack_st_OPENSSL_BLOCK { _STACK stack; };
+typedef void *d2i_of_void(void **,const unsigned char **,long); typedef int i2d_of_void(void *,unsigned char **);
+
+struct stack_st_OPENSSL_BLOCK *d2i_ASN1_SET(struct stack_st_OPENSSL_BLOCK **a,
+         const unsigned char **pp,
+         long length, d2i_of_void *d2i,
+         void (*free_func)(OPENSSL_BLOCK), int ex_tag,
+         int ex_class);



Home | Main Index | Thread Index | Old Index