xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_334.c (revision 039b010016da489b3c993f4814255a8bc72125df)
1 /*	$NetBSD: msg_334.c,v 1.5 2023/08/02 18:51:25 rillig Exp $	*/
2 # 3 "msg_334.c"
3 
4 // Test for message: parameter %d expects '%s', gets passed '%s' [334]
5 //
6 // See d_c99_bool_strict.c for many more examples.
7 
8 /* lint1-extra-flags: -T -X 351 */
9 
10 typedef _Bool bool;
11 
12 void
13 test_bool(bool);
14 void
15 test_int(int);
16 
17 void
caller(bool b,int i)18 caller(bool b, int i)
19 {
20 	test_bool(b);
21 
22 	/* expect+1: error: parameter 1 expects '_Bool', gets passed 'int' [334] */
23 	test_bool(i);
24 
25 	/* expect+1: error: parameter 1 expects 'int', gets passed '_Bool' [334] */
26 	test_int(b);
27 
28 	test_int(i);
29 }
30