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 )