msg_183.c revision 1.4
1/* $NetBSD: msg_183.c,v 1.4 2022/06/22 19:23:18 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: function has return type 'pointer to void' but returns '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