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

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

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

void take_void_pointer(void *);

void *
to_void_pointer(void)
{
	/* expect+1: warning: ANSI C forbids conversion of function pointer to 'void *' [303] */
	return to_void_pointer;
}

void (*to_function_pointer(void *arg))(void)
{
	/* expect+1: warning: ANSI C forbids conversion of 'void *' to function pointer [303] */
	return arg;
}