summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2008-07-31 22:55:12 +0000
committerglx <glx@openttd.org>2008-07-31 22:55:12 +0000
commit6ae3c95a0c0af316bad98a127e38f5de9921e238 (patch)
tree84bd732b01d170225e7826eabe2fff1a791e4502 /src
parent91dcacbf481e5086a04df284b18d00dbb4bc4e60 (diff)
downloadopenttd-6ae3c95a0c0af316bad98a127e38f5de9921e238.tar.xz
(svn r13904) -Fix (r13715): 'cast from/to pointer to/from integer of different size' warnings
Diffstat (limited to 'src')
-rw-r--r--src/strings.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/strings.cpp b/src/strings.cpp
index a82321111..ac02b5178 100644
--- a/src/strings.cpp
+++ b/src/strings.cpp
@@ -188,7 +188,7 @@ char *InlineString(char *buf, StringID string)
*/
void SetDParamStr(uint n, const char *str)
{
- SetDParam(n, (uint64)str);
+ SetDParam(n, (uint64)(size_t)str);
}
void InjectDParam(int amount)
@@ -297,7 +297,7 @@ static char *FormatTinyDate(char *buff, Date date, const char* last)
snprintf(day, lengthof(day), "%02i", ymd.day);
snprintf(month, lengthof(month), "%02i", ymd.month + 1);
- int64 args[3] = { (int64)day, (int64)month, ymd.year };
+ int64 args[3] = { (int64)(size_t)day, (int64)(size_t)month, ymd.year };
return FormatString(buff, GetStringPtr(STR_DATE_TINY), args, 0, last);
}
@@ -556,7 +556,7 @@ static char* FormatString(char* buff, const char* str, const int64* argv, uint c
break;
case SCC_RAW_STRING_POINTER: { // {RAW_STRING}
- const char *str = (const char*)GetInt64(&argv);
+ const char *str = (const char*)(size_t)GetInt64(&argv);
buff = FormatString(buff, str, argv, casei, last);
break;
}