summaryrefslogtreecommitdiff
path: root/tests/usr.bin/xlint/lint1/msg_304.c
blob: 5d6861482884a73b93b75e25b7c5646ba313aee1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*	$NetBSD: msg_304.c,v 1.4 2023/03/28 14:44:35 rillig Exp $	*/
# 3 "msg_304.c"

/* Test for message: ANSI C forbids conversion of %s to %s, arg #%d [304] */

/* lint1-flags: -sw -X 351 */

void take_void_pointer(void *);
void take_function_pointer(void (*)(void));

void
caller(void *arg)
{
	/* expect+1: warning: ANSI C forbids conversion of function pointer to 'void *', arg #1 [304] */
	take_void_pointer(caller);

	/* expect+1: warning: ANSI C forbids conversion of 'void *' to function pointer, arg #1 [304] */
	take_function_pointer(arg);
}