[PATCH v2 6/7] fixup! reftable: reftable file level tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



C99 style loop initializers still problematic with gnu89 C in older
compilers.

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@xxxxxxxxx>
---
 reftable/readwrite_test.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/reftable/readwrite_test.c b/reftable/readwrite_test.c
index 42ca48f83c..146b00cb02 100644
--- a/reftable/readwrite_test.c
+++ b/reftable/readwrite_test.c
@@ -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);
 	}
-- 
2.33.0.rc2.476.g1b09a32a73




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux