{
WORD First;
int weekofmonth = compareDate->wDay;
- First = ( 6 + compareDate->wDayOfWeek - date->wDayOfWeek + date->wDay ) % 7 + 1;
+ First = (WORD)(( 6 + compareDate->wDayOfWeek - date->wDayOfWeek + date->wDay ) % 7 + 1);
limit_day = First + 7 * (weekofmonth - 1);
if(limit_day > monthLengths[date->wMonth==2 && ISLEAP(date->wYear)][date->wMonth - 1])
limit_day -= 7;
input = this;
localTime.wYear = (short)input.year;
- localTime.wMonth = (short)input.month + 1;
+ localTime.wMonth = (short)(input.month + 1);
localTime.wDay = (short)input.day;
localTime.wHour = (short)input.hour;
localTime.wMinute = (short)input.minute;
utc = this;
systemTime.wYear = (short)utc.year;
- systemTime.wMonth = (short)utc.month + 1;
+ systemTime.wMonth = (short)(utc.month + 1);
systemTime.wDay = (short)utc.day;
systemTime.wHour = (short)utc.hour;
systemTime.wMinute = (short)utc.minute;
FILETIME fileTime, localFileTime;
localTime.wYear = (short)year;
- localTime.wMonth = (short)month + 1;
+ localTime.wMonth = (short)(month + 1);
localTime.wDay = (short)day;
localTime.wHour = (short)hour;
localTime.wMinute = (short)minute;
SYSTEMTIME systemTime, localTime;
systemTime.wYear = (short)year;
- systemTime.wMonth = (short)month + 1;
+ systemTime.wMonth = (short)(month + 1);
systemTime.wDay = (short)day;
systemTime.wHour = (short)hour;
systemTime.wMinute = (short)minute;