diff --git a/src/common/appcmn.cpp b/src/common/appcmn.cpp index 926104d482..162512f876 100644 --- a/src/common/appcmn.cpp +++ b/src/common/appcmn.cpp @@ -323,7 +323,6 @@ bool wxAppBase::ProcessIdle() wxIdleEvent event; bool needMore = FALSE; wxWindowList::compatibility_iterator node = wxTopLevelWindows.GetFirst(); - node = wxTopLevelWindows.GetFirst(); while (node) { wxWindow* win = node->GetData(); diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index e2b9155f69..56324c0d3d 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -257,11 +257,10 @@ wxDateTime::wxDateTime_t GetNumOfDaysInMonth(int year, wxDateTime::Month month) // (in seconds) static int GetTimeZone() { +#ifdef WX_GMTOFF_IN_TM // set to TRUE when the timezone is set static bool s_timezoneSet = FALSE; -#ifdef WX_GMTOFF_IN_TM static long gmtoffset = LONG_MAX; // invalid timezone -#endif // ensure that the timezone variable is set by calling localtime if ( !s_timezoneSet ) @@ -274,19 +273,16 @@ static int GetTimeZone() tm = localtime(&t); s_timezoneSet = TRUE; -#ifdef WX_GMTOFF_IN_TM // note that GMT offset is the opposite of time zone and so to return // consistent results in both WX_GMTOFF_IN_TM and !WX_GMTOFF_IN_TM // cases we have to negate it gmtoffset = -tm->tm_gmtoff; -#endif } -#ifdef WX_GMTOFF_IN_TM return (int)gmtoffset; -#else +#else // !WX_GMTOFF_IN_TM return (int)WX_TIMEZONE; -#endif +#endif // WX_GMTOFF_IN_TM/!WX_GMTOFF_IN_TM } // return the integral part of the JDN for the midnight of the given date (to diff --git a/src/common/dircmn.cpp b/src/common/dircmn.cpp index 801e2d1f9f..e613a8b038 100644 --- a/src/common/dircmn.cpp +++ b/src/common/dircmn.cpp @@ -100,7 +100,7 @@ size_t wxDir::Traverse(wxDirTraverser& sink, wxString dirname; for ( bool cont = GetFirst(&dirname, _T(""), wxDIR_DIRS | wxDIR_HIDDEN); cont; - cont = GetNext(&dirname) ) + cont = cont && GetNext(&dirname) ) { const wxString fulldirname = prefix + dirname;