From f5cd97870d58ebf1fa2267299f80b864281884c6 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 14 May 2001 21:28:04 +0000 Subject: [PATCH] warning fixed git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10158 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/datetime.h | 6 +++--- src/common/datetime.cpp | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/wx/datetime.h b/include/wx/datetime.h index 55484c7b47..92398e53f2 100644 --- a/include/wx/datetime.h +++ b/include/wx/datetime.h @@ -42,12 +42,12 @@ class WXDLLEXPORT wxDateSpan; #ifdef __WXMAC__ #if __MSL__ < 0x6000 - #define WX_TIME_BASE_OFFSET ( 2082844800L + 126144000L ) + #define WX_TIME_BASE_OFFSET ( 2082844800L + 126144000L ) #else - #define WX_TIME_BASE_OFFSET 0 + #define WX_TIME_BASE_OFFSET 0 #endif #else - #define WX_TIME_BASE_OFFSET 0 + #define WX_TIME_BASE_OFFSET 0 #endif /* * TODO diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index 2874bc6519..987c812183 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -3170,7 +3170,7 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date) // but we already have a month - maybe we guessed wrong? if ( !haveDay ) { - // no need to check in month range as always < 12, but + // no need to check in month range as always < 12, but // the days are counted from 1 unlike the months day = (wxDateTime_t)mon + 1; haveDay = TRUE; @@ -3180,7 +3180,7 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date) // could possible be the year (doesn't the year come // before the month in the japanese format?) (FIXME) break; - } + } } mon = mon2; @@ -3292,7 +3292,8 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date) mon = (wxDateTime::Month)(day - 1); // we're in the current year then - if ( year <= GetNumOfDaysInMonth(Inv_Year, mon) ) + if ( (year > 0) && + (unsigned)year <= GetNumOfDaysInMonth(Inv_Year, mon) ) { day = year; -- 2.45.2