mirror of https://github.com/libsdl-org/SDL.git
Fixed warning C4701: potentially uninitialized local variable 'srcpixel' used
This commit is contained in:
parent
d383299779
commit
f6f9468d84
|
|
@ -55,10 +55,10 @@ void SDL_Blit_Slow(SDL_BlitInfo *info)
|
||||||
const Uint32 modulateG = info->g;
|
const Uint32 modulateG = info->g;
|
||||||
const Uint32 modulateB = info->b;
|
const Uint32 modulateB = info->b;
|
||||||
const Uint32 modulateA = info->a;
|
const Uint32 modulateA = info->a;
|
||||||
Uint32 srcpixel;
|
Uint32 srcpixel = 0;
|
||||||
Uint32 srcR, srcG, srcB, srcA;
|
Uint32 srcR = 0, srcG = 0, srcB = 0, srcA = 0;
|
||||||
Uint32 dstpixel;
|
Uint32 dstpixel = 0;
|
||||||
Uint32 dstR, dstG, dstB, dstA;
|
Uint32 dstR = 0, dstG = 0, dstB = 0, dstA = 0;
|
||||||
Uint64 srcy, srcx;
|
Uint64 srcy, srcx;
|
||||||
Uint64 posy, posx;
|
Uint64 posy, posx;
|
||||||
Uint64 incy, incx;
|
Uint64 incy, incx;
|
||||||
|
|
@ -114,13 +114,11 @@ void SDL_Blit_Slow(SDL_BlitInfo *info)
|
||||||
RGBA_FROM_ABGR2101010(srcpixel, srcR, srcG, srcB, srcA);
|
RGBA_FROM_ABGR2101010(srcpixel, srcR, srcG, srcB, srcA);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
srcR = srcG = srcB = srcA = 0;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SlowBlitPixelAccess_Large:
|
case SlowBlitPixelAccess_Large:
|
||||||
/* Handled in SDL_Blit_Slow_Float() */
|
/* Handled in SDL_Blit_Slow_Float() */
|
||||||
srcpixel = srcR = srcG = srcB = srcA = 0;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -163,18 +161,15 @@ void SDL_Blit_Slow(SDL_BlitInfo *info)
|
||||||
RGBA_FROM_ABGR2101010(dstpixel, dstR, dstG, dstB, dstA);
|
RGBA_FROM_ABGR2101010(dstpixel, dstR, dstG, dstB, dstA);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
dstR = dstG = dstB = dstA = 0;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SlowBlitPixelAccess_Large:
|
case SlowBlitPixelAccess_Large:
|
||||||
/* Handled in SDL_Blit_Slow_Float() */
|
/* Handled in SDL_Blit_Slow_Float() */
|
||||||
dstR = dstG = dstB = dstA = 0;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* don't care */
|
/* don't care */
|
||||||
dstR = dstG = dstB = dstA = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flags & SDL_COPY_MODULATE_COLOR) {
|
if (flags & SDL_COPY_MODULATE_COLOR) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue