(svn r13904) -Fix (r13715): 'cast from/to pointer to/from integer of different size' warnings

This commit is contained in:
glx 2008-07-31 22:55:12 +00:00
parent fb80ed218d
commit 513f4c7ca7
1 changed files with 3 additions and 3 deletions

View File

@ -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;
}