All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Carlo Marcelo Arenas Belón" <carenas@gmail.com>
To: git@vger.kernel.org
Cc: hanwen@google.com, "Carlo Marcelo Arenas Belón" <carenas@gmail.com>
Subject: [PATCH 2/3] fixup! reftable: add merged table view
Date: Wed,  1 Sep 2021 22:30:22 -0700	[thread overview]
Message-ID: <20210902053023.44006-3-carenas@gmail.com> (raw)
In-Reply-To: <20210902053023.44006-1-carenas@gmail.com>

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
Just like in the next patch, having relevant code in the assert might be
a problem, but this is mostly test code and still passes.

 reftable/merged_test.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/reftable/merged_test.c b/reftable/merged_test.c
index f58e44003e..b7be4dcf9f 100644
--- a/reftable/merged_test.c
+++ b/reftable/merged_test.c
@@ -47,8 +47,8 @@ static void write_test_table(struct strbuf *buf,
 	reftable_writer_set_limits(w, min, max);
 
 	for (i = 0; i < n; i++) {
-		uint64_t before = refs[i].update_index;
-		int n = reftable_writer_add_ref(w, &refs[i]);
+		MAYBE_UNUSED uint64_t before = refs[i].update_index;
+		MAYBE_UNUSED int n = reftable_writer_add_ref(w, &refs[i]);
 		assert(n == 0);
 		assert(before == refs[i].update_index);
 	}
@@ -181,7 +181,7 @@ static void test_merged(const char *fn_name)
 		},
 	};
 
-	struct reftable_ref_record want[] = {
+	MAYBE_UNUSED struct reftable_ref_record want[] = {
 		r2[0],
 		r1[1],
 		r3[0],
@@ -251,7 +251,7 @@ static void test_default_write_opts(const char *fn_name)
 	int err;
 	struct reftable_block_source source = { NULL };
 	struct reftable_table *tab = reftable_calloc(sizeof(*tab) * 1);
-	uint32_t hash_id;
+	MAYBE_UNUSED uint32_t hash_id;
 	struct reftable_reader *rd = NULL;
 	struct reftable_merged_table *merged = NULL;
 
-- 
2.33.0.481.g26d3bed244


  parent reply	other threads:[~2021-09-02  5:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-02  5:30 [PATCH 0/3] hn/reftable: fixes for building with -DNDEBUG Carlo Marcelo Arenas Belón
2021-09-02  5:30 ` [PATCH 1/3] fixup! refs: RFC: Reftable support for git-core Carlo Marcelo Arenas Belón
2021-09-02  9:05   ` Jeff King
2021-09-02  9:26     ` Han-Wen Nienhuys
2021-09-02  5:30 ` Carlo Marcelo Arenas Belón [this message]
2021-09-02  5:30 ` [PATCH 3/3] fixup! reftable: add a heap-based priority queue for reftable records Carlo Marcelo Arenas Belón
2021-09-02  9:09   ` Jeff King
2021-09-02 20:08     ` Junio C Hamano
2021-09-02 22:40       ` Jeff King
2021-09-03  4:42         ` Junio C Hamano

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=20210902053023.44006-3-carenas@gmail.com \
    --to=carenas@gmail.com \
    --cc=git@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.