summaryrefslogtreecommitdiff
path: root/tests/usr.bin/xlint/lint1/msg_019.c
blob: ad86c08d2ed967f0179f358b95a2b23df92ed972 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*	$NetBSD: msg_019.c,v 1.7 2023/03/28 14:44:34 rillig Exp $	*/
# 3 "msg_019.c"

// Test for message: void type for '%s' [19]

/* lint1-extra-flags: -X 351 */

/* expect+1: error: void type for 'global_variable' [19] */
void global_variable;

/* expect+2: error: void type for 'unit_variable' [19] */
/* expect+1: warning: static variable 'unit_variable' unused [226] */
static void unit_variable;

/* expect+3: warning: argument 'parameter' unused in function 'function' [231] */
/* expect+2: error: void parameter 'parameter' cannot have name [61] */
void
function(void parameter)
{
	/* expect+1: error: void type for 'local_variable' [19] */
	void local_variable;
}