xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_304.c (revision 7d62b00eb9ad855ffcd7da46b41e23feb5476fac)
1 /*	$NetBSD: msg_304.c,v 1.3 2021/08/16 18:51:58 rillig Exp $	*/
2 # 3 "msg_304.c"
3 
4 /* Test for message: ANSI C forbids conversion of %s to %s, arg #%d [304] */
5 
6 /* lint1-flags: -sw */
7 
8 void take_void_pointer(void *);
9 void take_function_pointer(void (*)(void));
10 
11 void
12 caller(void *arg)
13 {
14 	/* expect+1: warning: ANSI C forbids conversion of function pointer to 'void *', arg #1 [304] */
15 	take_void_pointer(caller);
16 
17 	/* expect+1: warning: ANSI C forbids conversion of 'void *' to function pointer, arg #1 [304] */
18 	take_function_pointer(arg);
19 }
20