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

// Test for message: declaration of '%s' hides earlier one [95]

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

int identifier;

int
example(int identifier)
{

	{
		/* expect+2: warning: 'identifier' set but not used in function 'example' [191] */
		/* expect+1: warning: declaration of 'identifier' hides earlier one [95] */
		int identifier = 3;
	}

	return identifier;
}