]> git.saurik.com Git - wxWidgets.git/commitdiff
Warning fixes for VC5.
authorMichael Wetherell <mike.wetherell@ntlworld.com>
Tue, 29 Aug 2006 09:57:41 +0000 (09:57 +0000)
committerMichael Wetherell <mike.wetherell@ntlworld.com>
Tue, 29 Aug 2006 09:57:41 +0000 (09:57 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/dbtable.cpp
src/generic/grid.cpp

index 7824b7282065e3ed163c80f6e92329a5cdaf0d65..b453797e523e117ae304566a4597dea299bebc0d 100644 (file)
@@ -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';
index 6d791ab4809f9acf6a6a85d231284f33a33b90e6..90b76b3679513827c5df60b69ca70bdb2eadbdd5 100644 (file)
@@ -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 )