xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_259.c (revision 627f7eb200a4419d89b531d55fccd2ee3ffdcde0)
1 /*	$NetBSD: msg_259.c,v 1.6 2021/02/04 07:39:39 rillig Exp $	*/
2 # 3 "msg_259.c"
3 
4 // Test for message: argument #%d is converted from '%s' to '%s' due to prototype [259]
5 
6 /* lint1-extra-flags: -h */
7 
8 void farg_char(char);
9 void farg_int(int);
10 void farg_long(long);
11 
12 void
13 example(char c, int i, long l)
14 {
15 	farg_char(c);
16 	farg_int(c);
17 	farg_long(c);		/* XXX: 259 on ILP32 but not LP64 */
18 	farg_char(i);		/* XXX: why no warning? */
19 	farg_int(i);
20 	farg_long(i);		/* XXX: 259 on ILP32 but not LP64 */
21 	farg_char(l);		/* XXX: why no warning? */
22 	farg_int(l);		/* expect: 259 */
23 	farg_long(l);
24 }
25