git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Carlo Marcelo Arenas Belón" <carenas@gmail.com>
To: git@vger.kernel.org
Cc: hanwen@google.com, gitster@pobox.com,
	"Carlo Marcelo Arenas Belón" <carenas@gmail.com>
Subject: [PATCH v2 6/7] fixup! reftable: reftable file level tests
Date: Sun, 15 Aug 2021 18:15:37 -0700	[thread overview]
Message-ID: <20210816011538.34199-7-carenas@gmail.com> (raw)
In-Reply-To: <20210816011538.34199-1-carenas@gmail.com>

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(-)

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


  parent reply	other threads:[~2021-08-16  1:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-02 19:00 [PATCH 0/3] hn/reftable "fixes" for OpenBSD Carlo Marcelo Arenas Belón
2021-08-02 19:00 ` [PATCH 1/3] fixup! Provide zlib's uncompress2 from compat/zlib-compat.c Carlo Marcelo Arenas Belón
2021-08-02 19:00 ` [PATCH 2/3] reftable: clarify zlib version dependency Carlo Marcelo Arenas Belón
2021-08-02 19:00 ` [PATCH 3/3] openbsd: allow reftable building with zlib 1.2.3 Carlo Marcelo Arenas Belón
2021-08-04  6:44 ` [PATCH 4/3] fixup! reftable: add dump utility Carlo Marcelo Arenas Belón
2021-08-04 17:24   ` Junio C Hamano
2021-08-16  1:15 ` [PATCH v2 0/7] hn/reftable "fixes" for BSD Carlo Marcelo Arenas Belón
2021-08-16  1:15   ` [PATCH v2 1/7] fixup! Provide zlib's uncompress2 from compat/zlib-compat.c Carlo Marcelo Arenas Belón
2021-08-16  1:15   ` [PATCH v2 2/7] reftable: clarify zlib version dependency Carlo Marcelo Arenas Belón
2021-08-16  1:15   ` [PATCH v2 3/7] openbsd: allow reftable building with zlib 1.2.3 Carlo Marcelo Arenas Belón
2021-08-16  1:15   ` [PATCH v2 4/7] fixup! reftable: add dump utility Carlo Marcelo Arenas Belón
2021-08-16  1:15   ` [PATCH v2 5/7] fixup! Provide zlib's uncompress2 from compat/zlib-compat.c Carlo Marcelo Arenas Belón
2021-08-16  1:15   ` Carlo Marcelo Arenas Belón [this message]
2021-08-16  1:15   ` [PATCH v2 7/7] fixup! reftable: (de)serialization for the polymorphic record type Carlo Marcelo Arenas Belón

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210816011538.34199-7-carenas@gmail.com \
    --to=carenas@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=hanwen@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).