From 7e44aad627aad3b9e921d4b0af59147860da872e Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 31 Aug 2025 10:30:23 -0400 Subject: [PATCH] address a static analyzer complaint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mthrowu.c: In function ‘hit_bars’: mthrowu.c:1419:25: warning: ‘maybe_unused’ attribute ignored [-Wattributes] 1419 | static enum sound_effect_entries se[] SOUNDLIBONLY = { mthrowu.c:1419:46: warning: unused variable ‘se’ [-Wunused-variable] 1419 | static enum sound_effect_entries se[] SOUNDLIBONLY = { --- src/mthrowu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mthrowu.c b/src/mthrowu.c index 259484698..a52a678f2 100644 --- a/src/mthrowu.c +++ b/src/mthrowu.c @@ -1416,7 +1416,7 @@ hit_bars( } } else { if (!Deaf) { - static enum sound_effect_entries se[] SOUNDLIBONLY = { + static enum sound_effect_entries se[] = { se_zero_invalid, se_bars_whang, se_bars_whap, se_bars_flapp, se_bars_clink, se_bars_clonk @@ -1436,6 +1436,7 @@ hit_bars( Soundeffect(se[bsindx], 100); pline("%s!", barsounds[bsindx]); + nhUse(se[bsindx]); } if (!(harmless_missile(otmp) || is_flimsy(otmp))) noise = 4 * 4;