From: SHIRAKATA Kentaro Date: Wed, 16 Mar 2022 13:45:39 +0000 (+0900) Subject: Add explicit cast to void X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1c7faa0585a80b58b6fd1be5e2b9a6a2b9d8d00b;p=nethack Add explicit cast to void All other these calls not using a return value have a cast. --- diff --git a/src/detect.c b/src/detect.c index 50b2c4dc0..5506dde59 100644 --- a/src/detect.c +++ b/src/detect.c @@ -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; } diff --git a/src/dothrow.c b/src/dothrow.c index b8c2d2cf6..a1aac0ea2 100644 --- a/src/dothrow.c +++ b/src/dothrow.c @@ -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; diff --git a/src/mon.c b/src/mon.c index 7e20de0a7..1512028b5 100644 --- 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