]> granicus.if.org Git - nethack/commitdiff
resolve 5 analyzer warnings if no SND_LIB_* define
authornhmall <nhmall@nethack.org>
Fri, 20 Jan 2023 22:32:55 +0000 (17:32 -0500)
committernhmall <nhmall@nethack.org>
Fri, 20 Jan 2023 22:32:55 +0000 (17:32 -0500)
src/apply.c
src/do.c
src/dokick.c
src/read.c
src/zap.c

index 8d07e9f6e2383f8d8eea5c3589b93b3b5d185edc..0c6bb5ee40b03927cfd3a5021e5f798865443158 100644 (file)
@@ -4210,8 +4210,9 @@ flip_through_book(struct obj *obj)
 
     if (obj->otyp == SPE_BOOK_OF_THE_DEAD) {
         if (!Deaf) {
-            if (!Hallucination)
+            if (!Hallucination) {
                 Soundeffect(se_rustling_paper, 50);
+            }
             You_hear("the pages make an unpleasant %s sound.",
                      Hallucination ? "chuckling"
                                    : "rustling");
index 0256489d3cf68d563badcd2a6f194c6d72636cfa..b6aae4ce54d62e0ccd92bf58e37571294e5a8bc6 100644 (file)
--- a/src/do.c
+++ b/src/do.c
@@ -110,10 +110,11 @@ boulder_hits_pool(
                           the(xname(otmp)), fills_up ? "fills" : "falls into",
                           what);
                 } else if (!Deaf) {
-                    if (lava)
+                    if (lava) {
                         Soundeffect(se_sizzling, 100);
-                    else
+                    } else {
                         Soundeffect(se_splash, 100);
+                    }
                     You_hear("a%s splash.", lava ? " sizzling" : "");
                 }
                 wake_nearto(rx, ry, 40);
index 0f2ea9eb719b37bd529b09cf2b26ee4ccd2aceeb..0a55e0d7da6c5d63f37a8b1aef84eb4277cba883 100644 (file)
@@ -1321,8 +1321,9 @@ dokick(void)
             } else if (!(gm.maploc->looted & S_LPUDDING) && !rn2(3)
                        && !(gm.mvitals[PM_BLACK_PUDDING].mvflags & G_GONE)) {
                 if (Blind) {
-                    if (!Deaf)
+                    if (!Deaf) {
                         Soundeffect(se_gushing_sound, 100);
+                    }
                     You_hear("a gushing sound.");
                 } else {
                     pline("A %s ooze gushes up from the drain!",
index 365ba01d1accb70edead050a3b0c955ad6f6357b..ccb1f3693768a09bcc85609acd2d3573c53a73f0 100644 (file)
@@ -1350,10 +1350,11 @@ seffect_scare_monster(struct obj **sobjp)
         }
     }
     if (otyp == SCR_SCARE_MONSTER || !ct) {
-        if (confused || scursed)
+        if (confused || scursed) {
             Soundeffect(se_sad_wailing, 50);
-        else
+        } else {
             Soundeffect(se_sad_wailing, 50);
+        }
         You_hear("%s %s.", (confused || scursed) ? "sad wailing"
                  : "maniacal laughter",
                  !ct ? "in the distance" : "close by");
index 61a8aae3fb0d7e1ea20187800dd1f10b4484c9b9..0104280c33cd8215192381b14485480b28d1aa8a 100644 (file)
--- a/src/zap.c
+++ b/src/zap.c
@@ -4803,8 +4803,9 @@ zap_over_floor(
                     lev->typ = lava ? ROOM : ICE;
                 }
                 bury_objs(x, y);
-                if (!lava)
+                if (!lava) {
                     Soundeffect(se_soft_crackling, 30);
+                }
                 if (see_it) {
                     if (lava)
                         Norep("The %s cools and solidifies.",