From 35cd9dba7b1e71937fa59949fd7e6f005a2c11d6 Mon Sep 17 00:00:00 2001 From: George Tasker Date: Fri, 20 Apr 2001 11:21:40 +0000 Subject: [PATCH] Changed code to get rid of a compiler warning about statement always being FALSE git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/thread.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/msw/thread.cpp b/src/msw/thread.cpp index a743d287b0..f76f9a4c7b 100644 --- a/src/msw/thread.cpp +++ b/src/msw/thread.cpp @@ -327,8 +327,14 @@ void wxCondition::Broadcast() wxCriticalSection::wxCriticalSection() { - wxASSERT_MSG( sizeof(CRITICAL_SECTION) <= sizeof(m_buffer), +#ifdef __WXDEBUG__ + // Done this way to stop warnings during compilation about statement + // always being false + int csSize = sizeof(CRITICAL_SECTION); + int bSize = sizeof(m_buffer); + wxASSERT_MSG( csSize <= bSize, _T("must increase buffer size in wx/thread.h") ); +#endif ::InitializeCriticalSection((CRITICAL_SECTION *)m_buffer); }