@@ -120,7 +120,7 @@ static void test_log_buffer_size(void)
struct reftable_write_options opts = {
.block_size = 4096,
};
- int err;
+ int err, i;
struct reftable_log_record log = { .refname = "refs/heads/master",
.update_index = 0xa,
.value_type = REFTABLE_LOG_UPDATE,
@@ -138,7 +138,7 @@ static void test_log_buffer_size(void)
hash, to ensure that the compressed part is larger than the original.
*/
uint8_t hash1[GIT_SHA1_RAWSZ], hash2[GIT_SHA1_RAWSZ];
- for (int i = 0; i < GIT_SHA1_RAWSZ; i++) {
+ for (i = 0; i < GIT_SHA1_RAWSZ; i++) {
hash1[i] = (uint8_t)(rand() % 256);
hash2[i] = (uint8_t)(rand() % 256);
}
C99 style loop initializers still problematic with gnu89 C in older compilers. Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> --- reftable/readwrite_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)