Fix an implicit-fallthrough and maybe-uninitialized warning

This commit is contained in:
Patric Mueller
2020-11-15 16:07:43 +01:00
parent 0dc44ad210
commit 56494d3479

View File

@@ -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;