Fixed clang errors about the gotos leaving certain variables uninitialized

This commit is contained in:
Magnus Norddahl 2017-01-03 20:53:40 +01:00
parent f523193121
commit b3cee51fd0
2 changed files with 6 additions and 3 deletions

View file

@ -125,6 +125,9 @@ namespace swrenderer
void R_RenderMaskedSegRange(drawseg_t *ds, int x1, int x2)
{
float *MaskedSWall = nullptr, MaskedScaleY = 0, rw_scalestep = 0;
fixed_t *maskedtexturecol = nullptr;
FTexture *tex;
int i;
sector_t tempsec; // killough 4/13/98
@ -188,7 +191,6 @@ namespace swrenderer
mfloorclip = openings + ds->sprbottomclip - ds->x1;
mceilingclip = openings + ds->sprtopclip - ds->x1;
float *MaskedSWall, MaskedScaleY, rw_scalestep;
// [RH] Draw fog partition
if (ds->bFogBoundary)
@ -206,7 +208,7 @@ namespace swrenderer
MaskedSWall = (float *)(openings + ds->swall) - ds->x1;
MaskedScaleY = ds->yscale;
fixed_t *maskedtexturecol = (fixed_t *)(openings + ds->maskedtexturecol) - ds->x1;
maskedtexturecol = (fixed_t *)(openings + ds->maskedtexturecol) - ds->x1;
spryscale = ds->iscale + ds->iscalestep * (x1 - ds->x1);
rw_scalestep = ds->iscalestep;

View file

@ -68,6 +68,7 @@ namespace swrenderer
bool calclighting;
bool rereadcolormap;
FDynamicColormap *usecolormap;
float light = 0;
if (decal->RenderFlags & RF_INVISIBLE || !viewactive || !decal->PicNum.isValid())
return;
@ -243,7 +244,7 @@ namespace swrenderer
rereadcolormap = false;
}
float light = lightleft + (x1 - savecoord.sx1) * lightstep;
light = lightleft + (x1 - savecoord.sx1) * lightstep;
if (fixedlightlev >= 0)
R_SetColorMapLight((r_fullbrightignoresectorcolor) ? &FullNormalLight : usecolormap, 0, FIXEDLIGHT2SHADE(fixedlightlev));
else if (fixedcolormap != NULL)