msg_183.c revision 1.3
1/*	$NetBSD: msg_183.c,v 1.3 2021/09/02 18:20:00 rillig Exp $	*/
2# 3 "msg_183.c"
3
4// Test for message: illegal combination of %s (%s) and %s (%s) [183]
5
6/* expect+2: warning: argument 'x' unused in function 'example' [231] */
7void *
8example(double x, int i, void *vp, int *ip, double *dp, void (*fp)(void))
9{
10	if (i < 0)
11		/* expect+1: error: return value type mismatch (pointer to void) and (double) [211] */
12		return x;
13
14	if (i < 1)
15		/* expect+1: warning: illegal combination of pointer (pointer to void) and integer (int) [183] */
16		return i;
17
18	if (i < 2)
19		return vp;
20
21	if (i < 3)
22		return ip;
23
24	if (i < 4)
25		return dp;
26
27	if (i < 5)
28		return fp;
29
30	return (void *)0;
31}
32