From 93233a9335aa26404405af54758e164bc0b96b41 Mon Sep 17 00:00:00 2001 From: smatz Date: Fri, 21 May 2010 05:42:41 +0000 Subject: (svn r19870) -Codechange: silence some of GCC 3.3 warnings --- src/table/settings.h | 2 +- src/viewport.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/table/settings.h b/src/table/settings.h index 4cae24b51..9565d2602 100644 --- a/src/table/settings.h +++ b/src/table/settings.h @@ -90,7 +90,7 @@ static bool UpdateClientConfigValues(int32 p1); */ #define NSD_GENERAL(name, def, cmd, guiflags, min, max, interval, many, str, proc, load)\ - {name, (const void*)(def), {(byte)cmd}, {(uint16)guiflags}, min, max, interval, many, str, proc, load} + {name, (const void*)(ptrdiff_t)(def), {(byte)cmd}, {(uint16)guiflags}, min, max, interval, many, str, proc, load} /* Macros for various objects to go in the configuration file. * This section is for global variables */ diff --git a/src/viewport.cpp b/src/viewport.cpp index 65cc9ff00..171c0b6fc 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -2330,9 +2330,9 @@ static void CalcRaildirsDrawstyle(TileHighlightData *thd, int x, int y, int meth /* 'Build' the last half rail tile if needed */ if ((offset & TILE_UNIT_MASK) > (TILE_SIZE / 2)) { if (dx + dy >= (int)TILE_SIZE) { - x += (dx + dy < 0) ? TILE_SIZE : -(int)TILE_SIZE; + x += (dx + dy < 0) ? (int)TILE_SIZE : -(int)TILE_SIZE; } else { - y += (dx + dy < 0) ? TILE_SIZE : -(int)TILE_SIZE; + y += (dx + dy < 0) ? (int)TILE_SIZE : -(int)TILE_SIZE; } } @@ -2365,9 +2365,9 @@ static void CalcRaildirsDrawstyle(TileHighlightData *thd, int x, int y, int meth /* 'Build' the last half rail tile if needed */ if ((offset & TILE_UNIT_MASK) > (TILE_SIZE / 2)) { if (dx - dy < 0) { - y += (dx > dy) ? TILE_SIZE : -(int)TILE_SIZE; + y += (dx > dy) ? (int)TILE_SIZE : -(int)TILE_SIZE; } else { - x += (dx < dy) ? TILE_SIZE : -(int)TILE_SIZE; + x += (dx < dy) ? (int)TILE_SIZE : -(int)TILE_SIZE; } } -- cgit v1.2.3-70-g09d2