From: Patric Mueller Date: Sun, 15 Nov 2020 15:07:43 +0000 (+0100) Subject: Fix an implicit-fallthrough and maybe-uninitialized warning X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=56494d3479f6d36fc00772a0eedfb5bd1d177216;p=nethack Fix an implicit-fallthrough and maybe-uninitialized warning --- diff --git a/src/dokick.c b/src/dokick.c index 81ed6c314..80cdcaa50 100644 --- a/src/dokick.c +++ b/src/dokick.c @@ -1617,7 +1617,7 @@ obj_delivery(near_hero) boolean near_hero; { register struct obj *otmp, *otmp2; - register int nx, ny; + int nx = 0, ny = 0; int where; boolean nobreak, noscatter; stairway *stway; @@ -1650,6 +1650,7 @@ boolean near_hero; switch (where) { case MIGR_LADDER_UP: isladder = TRUE; + /*FALLTHRU*/ case MIGR_STAIRS_UP: case MIGR_SSTAIRS: if ((stway = stairway_find_from(&fromdlev, isladder)) != 0) { @@ -1657,7 +1658,6 @@ boolean near_hero; nx = stway->sy; } break; - break; case MIGR_WITH_HERO: nx = u.ux, ny = u.uy; break;