some Microsoft compiler warnings

src/muse.c(2255) : warning C4702: unreachable code
src/options.c(2549) : warning C4702: unreachable code
src/restore.c(930) : warning C4701: potentially uninitialized local variable 'stway' used
src/sp_lev.c(5118) : warning C4701: potentially uninitialized local variable 'x' used
src/sp_lev.c(5118) : warning C4701: potentially uninitialized local variable 'y' used
src/trap.c(2979) : warning C4701: potentially uninitialized local variable 'cc' used
src/trap.c(2985) : warning C4701: potentially uninitialized local variable 'bcc' used
This commit is contained in:
nhmall
2021-01-17 22:58:52 -05:00
parent 3ef0f889e6
commit fb43299451
5 changed files with 5 additions and 5 deletions

View File

@@ -2252,6 +2252,7 @@ struct monst *mtmp;
}
return 1;
}
/*NOTREACHED*/
return 0;
case 0:
return 0; /* i.e. an exploded wand */

View File

@@ -2544,7 +2544,6 @@ char *op;
flags.paranoia_bits &= ~PARANOID_PRAY;
else
flags.paranoia_bits |= PARANOID_PRAY;
return optn_ok;
}
return optn_ok;
}

View File

@@ -910,7 +910,7 @@ rest_stairs(nhfp)
NHFILE *nhfp;
{
int buflen = 0;
stairway stway;
stairway stway = UNDEFINED_VALUES;
int len = 0;
stairway_free_all();

View File

@@ -5069,7 +5069,7 @@ lspo_terrain(L)
lua_State *L;
{
terrain tmpterrain;
xchar x, y;
xchar x = 0, y = 0;
struct selectionvar *sel = NULL;
int argc = lua_gettop(L);

View File

@@ -2931,8 +2931,8 @@ long ocount;
register int tmp;
schar dx, dy;
int distance;
coord cc;
coord bcc;
coord cc = UNDEFINED_VALUES,
bcc = UNDEFINED_VALUES;
int trycount = 0;
boolean success = FALSE;
int mindist = 4;