xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_334.c (revision 7d62b00eb9ad855ffcd7da46b41e23feb5476fac)
1 /*	$NetBSD: msg_334.c,v 1.2 2022/06/17 06:59:16 rillig Exp $	*/
2 # 3 "msg_334.c"
3 
4 // Test for message: argument #%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 */
9 
10 typedef _Bool bool;
11 
12 void
13 test_bool(bool);
14 void
15 test_int(int);
16 
17 void
18 caller(bool b, int i)
19 {
20 	test_bool(b);
21 
22 	/* expect+1: error: argument #1 expects '_Bool', gets passed 'int' [334] */
23 	test_bool(i);
24 
25 	/* expect+1: error: argument #1 expects 'int', gets passed '_Bool' [334] */
26 	test_int(b);
27 
28 	test_int(i);
29 }
30