From fe327394c76b006ed89bcca9f85276b55cbe6ccc Mon Sep 17 00:00:00 2001 From: Stanislav Shwartsman Date: Sat, 22 Sep 2012 19:59:40 +0000 Subject: [PATCH] fix gcc 4.7 warnings in voodoo code --- bochs/iodev/display/voodoo_data.h | 6 +++--- bochs/iodev/display/voodoo_func.h | 10 +++++----- bochs/iodev/display/voodoo_types.h | 2 -- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/bochs/iodev/display/voodoo_data.h b/bochs/iodev/display/voodoo_data.h index 5f8444a73..60598553b 100644 --- a/bochs/iodev/display/voodoo_data.h +++ b/bochs/iodev/display/voodoo_data.h @@ -3089,7 +3089,7 @@ do } \ \ /* compute "floating point" W value (used for depth and fog) */ \ - if ((ITERW) & U64(0xffff00000000)) \ + if ((ITERW) & BX_CONST64(0xffff00000000)) \ wfloat = 0x0000; \ else \ { \ @@ -3580,8 +3580,8 @@ void raster_##name(void *destbase, Bit32s y, const poly_extent *extent, const vo Bit32s tempclip; \ \ /* Y clipping buys us the whole scanline */ \ - if (scry < ((v->reg[clipLowYHighY].u >> 16) & 0x3ff) || \ - scry >= (v->reg[clipLowYHighY].u & 0x3ff)) \ + if (scry < (Bit32s)((v->reg[clipLowYHighY].u >> 16) & 0x3ff) || \ + scry >= (Bit32s)(v->reg[clipLowYHighY].u & 0x3ff)) \ { \ stats->pixels_in += stopx - startx; \ stats->clip_fail += stopx - startx; \ diff --git a/bochs/iodev/display/voodoo_func.h b/bochs/iodev/display/voodoo_func.h index 96be758ad..27c6afdc9 100644 --- a/bochs/iodev/display/voodoo_func.h +++ b/bochs/iodev/display/voodoo_func.h @@ -1084,7 +1084,7 @@ Bit32s fastfill(voodoo_state *v) /* iterate over blocks of 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; memcpy(extra.dither, dithermatrix, sizeof(extra.dither)); @@ -2506,10 +2506,10 @@ Bit32s texture_w(Bit32u offset, Bit32u data) /* apply clipping */ if (FBZMODE_ENABLE_CLIPPING(v->reg[fbzMode].u)) { - if (x < ((v->reg[clipLeftRight].u >> 16) & 0x3ff) || - x >= (v->reg[clipLeftRight].u & 0x3ff) || - scry < ((v->reg[clipLowYHighY].u >> 16) & 0x3ff) || - scry >= (v->reg[clipLowYHighY].u & 0x3ff)) + if (x < (int)((v->reg[clipLeftRight].u >> 16) & 0x3ff) || + x >= (int)(v->reg[clipLeftRight].u & 0x3ff) || + scry < (int)((v->reg[clipLowYHighY].u >> 16) & 0x3ff) || + scry >= (int)(v->reg[clipLowYHighY].u & 0x3ff)) { stats->pixels_in++; stats->clip_fail++; diff --git a/bochs/iodev/display/voodoo_types.h b/bochs/iodev/display/voodoo_types.h index 7ebf53a3e..8d7ca2cf1 100644 --- a/bochs/iodev/display/voodoo_types.h +++ b/bochs/iodev/display/voodoo_types.h @@ -50,8 +50,6 @@ struct _poly_extent poly_param_extent param[MAX_VERTEX_PARAMS]; /* starting and dx values for each parameter */ }; -#define U64(x) BX_CONST64(x) - #ifndef TRUE #define TRUE true #endif