X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5b7352027902bebecd06e2a124492fc0ee27f4e2..3d62dcb6b571cdcc0748f1f91223713755f54abc:/src/common/datetime.cpp diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index 7598153308..b50431a134 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -1637,7 +1637,12 @@ wxDateTime::wxDateTime_t wxDateTime::GetWeekOfMonth(wxDateTime::WeekFlags flags, Tm tm = GetTm(tz); wxDateTime dtMonthStart = wxDateTime(1, tm.mon, tm.year); size_t nWeek = GetWeekOfYear(flags) - dtMonthStart.GetWeekOfYear(flags) + 1; +#ifdef __VMS__ // nWeek is unsigned so avoid the warning + int nweek2 = (int) nWeek; + if ( nweek2 < 0 ) +#else if ( nWeek < 0 ) +#endif { // this may happen for January when Jan, 1 is the last week of the // previous year