From: aahancoc Date: Tue, 26 Jul 2016 20:03:54 +0000 (-0400) Subject: Fixed build error in test_read_format_zip_high_compression.c X-Git-Tag: v3.2.2~35^2~1^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b00e6add21052e2c8592df6f5e9ad4c0af7c8ee6;p=thirdparty%2Flibarchive.git Fixed build error in test_read_format_zip_high_compression.c C89 (what this library is compiled in) requires for loop iterators to be initialized outside the for loop. --- diff --git a/libarchive/test/test_read_format_zip_high_compression.c b/libarchive/test/test_read_format_zip_high_compression.c index 79c923a90..6c8aa8eee 100644 --- a/libarchive/test/test_read_format_zip_high_compression.c +++ b/libarchive/test/test_read_format_zip_high_compression.c @@ -80,6 +80,7 @@ DEFINE_TEST(test_read_format_zip_high_compression2) const size_t body_size = 1024 * 1024; const size_t buff_size = 2 * 1024 * 1024; char *body, *body_read, *buff; + int n; assert((body = malloc(body_size)) != NULL); assert((body_read = malloc(body_size)) != NULL); @@ -91,7 +92,7 @@ DEFINE_TEST(test_read_format_zip_high_compression2) * buffer is exactly 256k). */ - for(int n = 1024; n < (int)body_size; n += 1024) { + for(n = 1024; n < (int)body_size; n += 1024) { struct archive *a; struct archive_entry *entry; size_t used = 0;