xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_087.c (revision ccd9df534e375a4366c5b55f23782053c7a98d82)
1 /*	$NetBSD: msg_087.c,v 1.6 2023/03/28 14:44:34 rillig Exp $	*/
2 # 3 "msg_087.c"
3 
4 // Test for message: static '%s' hides external declaration [87]
5 
6 /* lint1-flags: -g -h -S -w -X 351 */
7 
8 extern int counter;
9 
10 int
11 count(void)
12 {
13 	/* expect+1: warning: static 'counter' hides external declaration [87] */
14 	static int counter;
15 	return counter++;
16 }
17