xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_126.c (revision 3117ece4fc4a4ca4489ba793710b60b0d26bab6c)
1 /*	$NetBSD: msg_126.c,v 1.8 2023/08/06 19:44:50 rillig Exp $	*/
2 # 3 "msg_126.c"
3 
4 // Test for message: incompatible types '%s' and '%s' in conditional [126]
5 
6 /* lint1-extra-flags: -X 351 */
7 
8 /* ARGSUSED */
9 int
10 max(int cond, void *ptr, double dbl)
11 {
12 	/* expect+2: error: incompatible types 'pointer to void' and 'double' in conditional [126] */
13 	/* expect+1: error: function 'max' expects to return value [214] */
14 	return cond ? ptr : dbl;
15 }
16