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

/* Test for message: ANSI C forbids conversion of %s to %s, op %s [305] */

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

void take_void_pointer(void *);

typedef void (*function)(void);

void
caller(void **void_pointer, function *function_pointer)
{
	/* expect+1: warning: ANSI C forbids conversion of function pointer to 'void *', op = [305] */
	*void_pointer = *function_pointer;

	/* expect+1: warning: ANSI C forbids conversion of 'void *' to function pointer, op = [305] */
	*function_pointer = *void_pointer;
}