xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_307.c (revision 7d62b00eb9ad855ffcd7da46b41e23feb5476fac)
1 /*	$NetBSD: msg_307.c,v 1.4 2022/06/11 11:52:13 rillig Exp $	*/
2 # 3 "msg_307.c"
3 
4 // Test for message: static variable '%s' set but not used [307]
5 
6 /* expect+1: warning: static variable 'set_but_not_used' set but not used [307] */
7 static int set_but_not_used;
8 
9 static int only_incremented;
10 
11 void function(void)
12 {
13 	set_but_not_used = 3;
14 	only_incremented++;
15 }
16