changeset 15236:ebd4e1b1fcb3 draft

(svn r19870) -Codechange: silence some of GCC 3.3 warnings
author smatz <smatz@openttd.org>
date Fri, 21 May 2010 05:42:41 +0000
parents 82c5c06183c1
children ee05ac91d67f
files src/table/settings.h src/viewport.cpp
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/table/settings.h
+++ b/src/table/settings.h
@@ -90,7 +90,7 @@
  */
 
 #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 */
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -2330,9 +2330,9 @@
 					/* '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 @@
 					/* '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;
 						}
 					}