]> granicus.if.org Git - nethack/commitdiff
Add explicit cast to void
authorSHIRAKATA Kentaro <argrath@ub32.org>
Wed, 16 Mar 2022 13:45:39 +0000 (22:45 +0900)
committerSHIRAKATA Kentaro <argrath@ub32.org>
Sat, 19 Mar 2022 11:50:40 +0000 (20:50 +0900)
All other these calls not using a return value have a cast.

src/detect.c
src/dothrow.c
src/mon.c

index 50b2c4dc0218b37cb96e915c7becbc932b5ef66f..5506dde59669d8de76d0bd83a019322b3cc7af60 100644 (file)
@@ -80,7 +80,7 @@ browse_map(int ter_typ, const char *ter_explain)
     save_autodescribe = iflags.autodescribe;
     iflags.autodescribe = TRUE;
     iflags.terrainmode = ter_typ;
-    getpos(&dummy_pos, FALSE, ter_explain);
+    (void) getpos(&dummy_pos, FALSE, ter_explain);
     iflags.terrainmode = 0;
     iflags.autodescribe = save_autodescribe;
 }
index b8c2d2cf662644ede8a655020418199d56e8fa34..a1aac0ea2936c53edfeef884d27df378edd880ca 100644 (file)
@@ -1068,7 +1068,7 @@ mhurtle(struct monst *mon, int dx, int dy, int range)
     cc.y = mon->my + (dy * range);
     (void) walk_path(&mc, &cc, mhurtle_step, (genericptr_t) mon);
     if (!DEADMONSTER(mon) && t_at(mon->mx, mon->my))
-        mintrap(mon, FORCEBUNGLE);
+        (void) mintrap(mon, FORCEBUNGLE);
     else
         (void) minliquid(mon);
     return;
index 7e20de0a77a39058204a80afce654ce5ff6ce1cd..1512028b595df1ccf0e5e661a6a0c26e708bbeba 100644 (file)
--- a/src/mon.c
+++ b/src/mon.c
@@ -2515,7 +2515,7 @@ mondead(register struct monst* mtmp)
                 if (enexto(&new_xy, mtmp->mx, mtmp->my, &mons[mndx]))
                     rloc_to(mtmp, new_xy.x, new_xy.y);
             }
-            newcham(mtmp, &mons[mndx], FALSE, FALSE);
+            (void) newcham(mtmp, &mons[mndx], FALSE, FALSE);
             if (mtmp->data == &mons[mndx])
                 mtmp->cham = NON_PM;
             else
@@ -3219,7 +3219,7 @@ vamp_stone(struct monst* mtmp)
                 pline("%s!", buf);
                 display_nhwindow(WIN_MESSAGE, FALSE);
             }
-            newcham(mtmp, &mons[mndx], FALSE, FALSE);
+            (void) newcham(mtmp, &mons[mndx], FALSE, FALSE);
             if (mtmp->data == &mons[mndx])
                 mtmp->cham = NON_PM;
             else