summaryrefslogtreecommitdiff
path: root/tests/usr.bin/xlint/lint1/msg_283.c
blob: 1c265b8cea9e9264c741481cb351d1f45c70d062 (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
30
31
32
/*	$NetBSD: msg_283.c,v 1.6 2023/07/07 19:45:22 rillig Exp $	*/
# 3 "msg_283.c"

// Test for message: argument number mismatch with directive /* %s */ [283]

/* Do not warn about unused parameters. */
/* lint1-extra-flags: -X 231,351 */

/* PRINTFLIKE */
void
printflike_comment(const char *fmt)
{
}

/* PRINTFLIKE 0 */
void
printflike_0_comment(const char *fmt)
{
}

/* PRINTFLIKE 2 */
void
printflike_2_comment(int a, const char *fmt)
{
}

/* PRINTFLIKE 3 */
void
printflike_3_comment(int a, const char *fmt)
/* expect+1: warning: argument number mismatch with directive ** PRINTFLIKE ** [283] */
{
}