xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_216.c (revision 7d62b00eb9ad855ffcd7da46b41e23feb5476fac)
1 /*	$NetBSD: msg_216.c,v 1.6 2022/10/01 09:42:40 rillig Exp $	*/
2 # 3 "msg_216.c"
3 
4 // Test for message: function '%s' has 'return expr' and 'return' [216]
5 
6 /* expect+2: error: old-style declaration; add 'int' [1] */
7 random(int n)
8 {
9 	if (n < 0)
10 		return -3;
11 	if (n < 2)
12 		return;
13 }
14 /* expect-1: warning: function 'random' has 'return expr' and 'return' [216] */
15