X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cb719f2e29bd20effa3259d2d7dead9fd857442c..169d1d643c0ee0c90fa8e393b5298606bbb68cfd:/src/common/textfile.cpp diff --git a/src/common/textfile.cpp b/src/common/textfile.cpp index 951f54e88d..25503be862 100644 --- a/src/common/textfile.cpp +++ b/src/common/textfile.cpp @@ -97,7 +97,7 @@ bool wxTextFile::OnRead(wxMBConv& conv) char *strBuf, *strPtr, *strEnd; char ch, chLast = '\0'; char buf[1024]; - int n, nRead; + size_t nRead; strPtr = strBuf = new char[1024]; strEnd = strBuf + 1024; @@ -105,14 +105,14 @@ bool wxTextFile::OnRead(wxMBConv& conv) do { nRead = m_file.Read(buf, WXSIZEOF(buf)); - if ( nRead == wxInvalidOffset ) + if ( nRead == (size_t)wxInvalidOffset ) { // read error (error message already given in wxFile::Read) delete[] strBuf; return false; } - for (n = 0; n < nRead; n++) + for (size_t n = 0; n < nRead; n++) { ch = buf[n]; switch ( ch )