fix gcc 4.7 warnings in voodoo code

This commit is contained in:
Stanislav Shwartsman 2012-09-22 19:59:40 +00:00
parent 31461c26fb
commit fe327394c7
3 changed files with 8 additions and 10 deletions

View File

@ -3089,7 +3089,7 @@ do
} \ } \
\ \
/* compute "floating point" W value (used for depth and fog) */ \ /* compute "floating point" W value (used for depth and fog) */ \
if ((ITERW) & U64(0xffff00000000)) \ if ((ITERW) & BX_CONST64(0xffff00000000)) \
wfloat = 0x0000; \ wfloat = 0x0000; \
else \ else \
{ \ { \
@ -3580,8 +3580,8 @@ void raster_##name(void *destbase, Bit32s y, const poly_extent *extent, const vo
Bit32s tempclip; \ Bit32s tempclip; \
\ \
/* Y clipping buys us the whole scanline */ \ /* Y clipping buys us the whole scanline */ \
if (scry < ((v->reg[clipLowYHighY].u >> 16) & 0x3ff) || \ if (scry < (Bit32s)((v->reg[clipLowYHighY].u >> 16) & 0x3ff) || \
scry >= (v->reg[clipLowYHighY].u & 0x3ff)) \ scry >= (Bit32s)(v->reg[clipLowYHighY].u & 0x3ff)) \
{ \ { \
stats->pixels_in += stopx - startx; \ stats->pixels_in += stopx - startx; \
stats->clip_fail += stopx - startx; \ stats->clip_fail += stopx - startx; \

View File

@ -1084,7 +1084,7 @@ Bit32s fastfill(voodoo_state *v)
/* iterate over blocks of extents */ /* iterate over blocks of extents */
for (y = sy; y < ey; y += ARRAY_LENGTH(extents)) for (y = sy; y < ey; y += ARRAY_LENGTH(extents))
{ {
int count = MIN(ey - y, ARRAY_LENGTH(extents)); int count = MIN(ey - y, (int) ARRAY_LENGTH(extents));
extra.state = v; extra.state = v;
memcpy(extra.dither, dithermatrix, sizeof(extra.dither)); memcpy(extra.dither, dithermatrix, sizeof(extra.dither));
@ -2506,10 +2506,10 @@ Bit32s texture_w(Bit32u offset, Bit32u data)
/* apply clipping */ /* apply clipping */
if (FBZMODE_ENABLE_CLIPPING(v->reg[fbzMode].u)) if (FBZMODE_ENABLE_CLIPPING(v->reg[fbzMode].u))
{ {
if (x < ((v->reg[clipLeftRight].u >> 16) & 0x3ff) || if (x < (int)((v->reg[clipLeftRight].u >> 16) & 0x3ff) ||
x >= (v->reg[clipLeftRight].u & 0x3ff) || x >= (int)(v->reg[clipLeftRight].u & 0x3ff) ||
scry < ((v->reg[clipLowYHighY].u >> 16) & 0x3ff) || scry < (int)((v->reg[clipLowYHighY].u >> 16) & 0x3ff) ||
scry >= (v->reg[clipLowYHighY].u & 0x3ff)) scry >= (int)(v->reg[clipLowYHighY].u & 0x3ff))
{ {
stats->pixels_in++; stats->pixels_in++;
stats->clip_fail++; stats->clip_fail++;

View File

@ -50,8 +50,6 @@ struct _poly_extent
poly_param_extent param[MAX_VERTEX_PARAMS]; /* starting and dx values for each parameter */ poly_param_extent param[MAX_VERTEX_PARAMS]; /* starting and dx values for each parameter */
}; };
#define U64(x) BX_CONST64(x)
#ifndef TRUE #ifndef TRUE
#define TRUE true #define TRUE true
#endif #endif