]> git.saurik.com Git - wxWidgets.git/commitdiff
a couple of more left over Borland unused variable/code warnings fixes
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 20 Oct 2008 10:52:17 +0000 (10:52 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 20 Oct 2008 10:52:17 +0000 (10:52 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/log.h
src/generic/datavgen.cpp
src/msw/frame.cpp

index 01d37ca61d04a4da56d2aa0aabf88058f2754247..83ea99678ea20d4901ee6c071f8f1088ea55c011 100644 (file)
@@ -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()
index 008eee74744d86b2d3f05971629d9ea41d01e58a..61a9457001086f2b8f329f96f40a86f5e6e06d3f 100644 (file)
@@ -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++)
index 2477f815d82dbd1588f6245520f40b8081a1665a..01835e87975a263de601ae88435388fb5ebb4477 100644 (file)
@@ -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;