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