aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/old-style-definition1.c
blob: f65d7dfe3187295741523ba9ebbc0ad924522706 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
extern int foo(int a, void *b);

int foo(a, b)
	int a;
	void *b;
{
	if (b)
		return a;
}

/*
 * check-name: old-stype-definition enabled
 * check-command: sparse -Wold-style-definition $file
 *
 * check-error-start
old-style-definition1.c:4:9: warning: non-ANSI definition of function 'foo'
 * check-error-end
 */