From c2b2c10ed65dab95f0ec880a4730826f0706a156 Mon Sep 17 00:00:00 2001 From: Michael Wetherell Date: Tue, 29 Aug 2006 09:57:41 +0000 Subject: [PATCH] Warning fixes for VC5. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/dbtable.cpp | 2 +- src/generic/grid.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/dbtable.cpp b/src/common/dbtable.cpp index 7824b72820..b453797e52 100644 --- a/src/common/dbtable.cpp +++ b/src/common/dbtable.cpp @@ -65,7 +65,7 @@ ULONG lastTableID = 0; void csstrncpyt(wxChar *target, const wxChar *source, int n) { - while ( (*target++ = *source++) != '\0' && --n ) + while ( (*target++ = *source++) != '\0' && --n != 0 ) ; *target = '\0'; diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 6d791ab480..90b76b3679 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -7957,8 +7957,8 @@ void wxGrid::DrawTextRectangle(wxDC& dc, continue; } - long lineWidth, - lineHeight; + long lineWidth = 0, + lineHeight = 0; dc.GetTextExtent(line, &lineWidth, &lineHeight); switch ( horizAlign )