From 51485b7601f6d01b5e7bf546e28ea7b3358f7a02 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 11 Aug 2003 01:22:21 +0000 Subject: [PATCH] fixed some warnings about unused variables values git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22763 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/appcmn.cpp | 1 - src/common/datetime.cpp | 10 +++------- src/common/dircmn.cpp | 2 +- 3 files changed, 4 insertions(+), 9 deletions(-) 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; -- 2.45.2