Add explicit unsigned int and char types in (for bug 4290)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
diff --git a/src/video/SDL_blit_N.c b/src/video/SDL_blit_N.c
index 1fe6a6b..8d2f0c3 100644
--- a/src/video/SDL_blit_N.c
+++ b/src/video/SDL_blit_N.c
@@ -2532,16 +2532,16 @@ Blit_3or4_to_3or4__same_rgb(SDL_BlitInfo * info)
if (dstfmt->Amask) {
/* SET_ALPHA */
- unsigned alpha = info->a;
- int alphashift = alpha << 24;
+ Uint32 alpha = info->a;
+ Uint32 alphashift = alpha << 24;
while (height--) {
/* *INDENT-OFF* */
DUFFS_LOOP(
{
Uint32 *dst32 = (Uint32*)dst;
- unsigned s0 = src[0];
- unsigned s1 = src[1];
- unsigned s2 = src[2];
+ Uint8 s0 = src[0];
+ Uint8 s1 = src[1];
+ Uint8 s2 = src[2];
*dst32 = (s0) | (s1 << 8) | (s2 << 16) | alphashift;
dst += dstbpp;
src += srcbpp;
@@ -2557,9 +2557,9 @@ Blit_3or4_to_3or4__same_rgb(SDL_BlitInfo * info)
DUFFS_LOOP(
{
Uint32 *dst32 = (Uint32*)dst;
- unsigned s0 = src[0];
- unsigned s1 = src[1];
- unsigned s2 = src[2];
+ Uint8 s0 = src[0];
+ Uint8 s1 = src[1];
+ Uint8 s2 = src[2];
*dst32 = (s0) | (s1 << 8) | (s2 << 16);
dst += dstbpp;
src += srcbpp;
@@ -2597,10 +2597,10 @@ Blit_3or4_to_3or4__inversed_rgb(SDL_BlitInfo * info)
DUFFS_LOOP(
{
Uint32 *dst32 = (Uint32*)dst;
- unsigned s0 = src[0];
- unsigned s1 = src[1];
- unsigned s2 = src[2];
- unsigned alphashift = src[3] << 24;
+ Uint8 s0 = src[0];
+ Uint8 s1 = src[1];
+ Uint8 s2 = src[2];
+ Uint32 alphashift = src[3] << 24;
/* inversed, compared to Blit_3or4_to_3or4__same_rgb */
*dst32 = (s0 << 16) | (s1 << 8) | (s2) | alphashift;
dst += dstbpp;
@@ -2612,16 +2612,16 @@ Blit_3or4_to_3or4__inversed_rgb(SDL_BlitInfo * info)
}
} else {
/* SET_ALPHA */
- unsigned alpha = info->a;
- int alphashift = alpha << 24;
+ Uint32 alpha = info->a;
+ Uint32 alphashift = alpha << 24;
while (height--) {
/* *INDENT-OFF* */
DUFFS_LOOP(
{
Uint32 *dst32 = (Uint32*)dst;
- unsigned s0 = src[0];
- unsigned s1 = src[1];
- unsigned s2 = src[2];
+ Uint8 s0 = src[0];
+ Uint8 s1 = src[1];
+ Uint8 s2 = src[2];
/* inversed, compared to Blit_3or4_to_3or4__same_rgb */
*dst32 = (s0 << 16) | (s1 << 8) | (s2) | alphashift;
dst += dstbpp;
@@ -2639,9 +2639,9 @@ Blit_3or4_to_3or4__inversed_rgb(SDL_BlitInfo * info)
DUFFS_LOOP(
{
Uint32 *dst32 = (Uint32*)dst;
- unsigned s0 = src[0];
- unsigned s1 = src[1];
- unsigned s2 = src[2];
+ Uint8 s0 = src[0];
+ Uint8 s1 = src[1];
+ Uint8 s2 = src[2];
/* inversed, compared to Blit_3or4_to_3or4__same_rgb */
*dst32 = (s0 << 16) | (s1 << 8) | (s2);
dst += dstbpp;