[BACK]Return to msg_216.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / tests / usr.bin / xlint / lint1

File: [cvs.NetBSD.org] / src / tests / usr.bin / xlint / lint1 / msg_216.c (download)

Revision 1.6, Sat Oct 1 09:42:40 2022 UTC (17 months, 3 weeks ago) by rillig
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Changes since 1.5: +2 -2 lines

lint: add hyphen to adjective 'old-style'

/*	$NetBSD: msg_216.c,v 1.6 2022/10/01 09:42:40 rillig Exp $	*/
# 3 "msg_216.c"

// Test for message: function '%s' has 'return expr' and 'return' [216]

/* expect+2: error: old-style declaration; add 'int' [1] */
random(int n)
{
	if (n < 0)
		return -3;
	if (n < 2)
		return;
}
/* expect-1: warning: function 'random' has 'return expr' and 'return' [216] */