xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_153.c (revision 7d62b00eb9ad855ffcd7da46b41e23feb5476fac)
1 /*	$NetBSD: msg_153.c,v 1.6 2022/06/16 16:58:36 rillig Exp $	*/
2 # 3 "msg_153.c"
3 
4 // Test for message: converting '%s' to incompatible '%s' for argument %d [153]
5 
6 
7 typedef double (*unary_operator)(double);
8 
9 void sink_function_pointer(unary_operator);
10 void sink_int_pointer(int *);
11 
12 void
13 to_function_pointer(int *x)
14 {
15 	/* expect+1: warning: converting 'pointer to int' to incompatible 'pointer to function(double) returning double' for argument 1 [153] */
16 	sink_function_pointer(x);
17 }
18 
19 void
20 to_int_pointer(unary_operator op)
21 {
22 	/* expect+1: warning: converting 'pointer to function(double) returning double' to incompatible 'pointer to int' for argument 1 [153] */
23 	sink_int_pointer(op);
24 }
25