1 /* $NetBSD: msg_307.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ 2 # 3 "msg_307.c" 3 4 // Test for message: static variable '%s' set but not used [307] 5 6 /* lint1-extra-flags: -X 351 */ 7 8 /* expect+1: warning: static variable 'set_but_not_used' set but not used [307] */ 9 static int set_but_not_used; 10 11 static int only_incremented; 12 function(void)13void function(void) 14 { 15 set_but_not_used = 3; 16 only_incremented++; 17 } 18