diff --git a/tests/archive/archivetest.cpp b/tests/archive/archivetest.cpp index c92cb7390d..e70751bf80 100644 --- a/tests/archive/archivetest.cpp +++ b/tests/archive/archivetest.cpp @@ -1200,9 +1200,10 @@ void CorruptionTestCase::runTest() CreateArchive(out); TestInputStream in(out, 0); wxFileOffset len = in.GetLength(); + int pos, size; // try flipping one byte in the archive - for (int pos = 0; pos < len; pos++) { + for (pos = 0; pos < len; pos++) { char n = in[pos]; in[pos] = ~n; ExtractArchive(in); @@ -1211,7 +1212,7 @@ void CorruptionTestCase::runTest() } // try zeroing one byte in the archive - for (int pos = 0; pos < len; pos++) { + for (pos = 0; pos < len; pos++) { char n = in[pos]; in[pos] = 0; ExtractArchive(in); @@ -1220,7 +1221,7 @@ void CorruptionTestCase::runTest() } // try chopping the archive off - for (int size = 1; size <= len; size++) { + for (size = 1; size <= len; size++) { in.Chop(size); ExtractArchive(in); in.Rewind();