From dd639a4f271eff1da3928925d3c16cc3ca3b169f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 20 Oct 2008 10:52:17 +0000 Subject: [PATCH] a couple of more left over Borland unused variable/code warnings fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/log.h | 7 +++++++ src/generic/datavgen.cpp | 2 +- src/msw/frame.cpp | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/wx/log.h b/include/wx/log.h index 01d37ca61d..83ea99678e 100644 --- a/include/wx/log.h +++ b/include/wx/log.h @@ -751,7 +751,14 @@ DECLARE_LOG_FUNCTION2(SysError, unsigned long, lErrCode); // empty functions if their parameters are complicated enough, but by // defining them as an empty inline function we ensure that even dumbest // compilers optimise them away +#ifdef __BORLANDC__ + // but Borland gives "W8019: Code has no effect" for wxLogNop() so we need + // to define it differently for it to avoid these warnings (same problem as + // with wxUnusedVar()) + #define wxLogNop() { } +#else inline void wxLogNop() { } +#endif #define wxVLogDebug(fmt, valist) wxLogNop() #define wxVLogTrace(mask, fmt, valist) wxLogNop() diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 008eee7474..61a9457001 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -2651,7 +2651,7 @@ void wxDataViewMainWindow::ScrollTo( int rows, int column ) { wxRect rect = GetClientRect(); int colnum = 0; - int x_start = 0, w = 0; + int x_start, w = 0; int xx, yy, xe; m_owner->CalcUnscrolledPosition( rect.x, rect.y, &xx, &yy ); for (x_start = 0; colnum < column; colnum++) diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index 2477f815d8..01835e8797 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -658,7 +658,7 @@ void wxFrame::PositionToolBar() toolbar->GetPosition( &tx, &ty ); toolbar->GetSize( &tw, &th ); - int x = 0, y = 0; + int x, y; if ( toolbar->HasFlag(wxTB_BOTTOM) ) { x = 0; -- 2.47.2