summaryrefslogtreecommitdiff
path: root/tests/usr.bin/xlint/lint1/msg_334.c
blob: d77551b61c33b76c980af786cc0ac6bf2cc71212 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*	$NetBSD: msg_334.c,v 1.3 2023/03/28 14:44:35 rillig Exp $	*/
# 3 "msg_334.c"

// Test for message: argument #%d expects '%s', gets passed '%s' [334]
//
// See d_c99_bool_strict.c for many more examples.

/* lint1-extra-flags: -T -X 351 */

typedef _Bool bool;

void
test_bool(bool);
void
test_int(int);

void
caller(bool b, int i)
{
	test_bool(b);

	/* expect+1: error: argument #1 expects '_Bool', gets passed 'int' [334] */
	test_bool(i);

	/* expect+1: error: argument #1 expects 'int', gets passed '_Bool' [334] */
	test_int(b);

	test_int(i);
}