diff options
author | glx <glx@openttd.org> | 2008-07-31 22:55:12 +0000 |
---|---|---|
committer | glx <glx@openttd.org> | 2008-07-31 22:55:12 +0000 |
commit | 513f4c7ca700118aca990d5e89d08d9ff4a737ef (patch) | |
tree | 84bd732b01d170225e7826eabe2fff1a791e4502 | |
parent | fb80ed218d53c9541ae2199f6c4e52306c348fd8 (diff) | |
download | openttd-513f4c7ca700118aca990d5e89d08d9ff4a737ef.tar.xz |
(svn r13904) -Fix (r13715): 'cast from/to pointer to/from integer of different size' warnings
-rw-r--r-- | src/strings.cpp | 6 |
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; } |