xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_095.c (revision 2dd295436a0082eb4f8d294f4aa73c223413d0f2)
1 /*	$NetBSD: msg_095.c,v 1.7 2023/07/07 06:03:31 rillig Exp $	*/
2 # 3 "msg_095.c"
3 
4 // Test for message: declaration of '%s' hides earlier one [95]
5 
6 /* lint1-flags: -ghSw -X 351 */
7 
8 int identifier;
9 
10 int
11 example(int identifier)
12 {
13 
14 	{
15 		/* expect+2: warning: 'identifier' set but not used in function 'example' [191] */
16 		/* expect+1: warning: declaration of 'identifier' hides earlier one [95] */
17 		int identifier = 3;
18 	}
19 
20 	return identifier;
21 }
22