aboutsummaryrefslogtreecommitdiffstats
path: root/reftable
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@google.com>2022-01-13 16:55:34 +0000
committerJunio C Hamano <gitster@pobox.com>2022-01-13 13:36:34 -0800
commitf2b255141b3008a46b4946e7da44b966797e4355 (patch)
tree7ef6cdadcdc216655ac3084952acf8b431716591 /reftable
parent1ffcbaa1a5f10c9f706314d77f88de20a4a498c2 (diff)
downloadgit-f2b255141b3008a46b4946e7da44b966797e4355.tar.gz
reftable: avoid initializing structs from structs
Apparently, the IBM xlc compiler doesn't like this. Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'reftable')
-rw-r--r--reftable/merged_test.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/reftable/merged_test.c b/reftable/merged_test.c
index 24461e8a80..abd34849fc 100644
--- a/reftable/merged_test.c
+++ b/reftable/merged_test.c
@@ -207,11 +207,11 @@ static void test_merged(void)
},
};
- struct reftable_ref_record want[] = {
- r2[0],
- r1[1],
- r3[0],
- r3[1],
+ struct reftable_ref_record *want[] = {
+ &r2[0],
+ &r1[1],
+ &r3[0],
+ &r3[1],
};
struct reftable_ref_record *refs[] = { r1, r2, r3 };
@@ -250,7 +250,7 @@ static void test_merged(void)
EXPECT(ARRAY_SIZE(want) == len);
for (i = 0; i < len; i++) {
- EXPECT(reftable_ref_record_equal(&want[i], &out[i],
+ EXPECT(reftable_ref_record_equal(want[i], &out[i],
GIT_SHA1_RAWSZ));
}
for (i = 0; i < len; i++) {
@@ -345,10 +345,10 @@ static void test_merged_logs(void)
.value_type = REFTABLE_LOG_DELETION,
},
};
- struct reftable_log_record want[] = {
- r2[0],
- r3[0],
- r1[1],
+ struct reftable_log_record *want[] = {
+ &r2[0],
+ &r3[0],
+ &r1[1],
};
struct reftable_log_record *logs[] = { r1, r2, r3 };
@@ -387,7 +387,7 @@ static void test_merged_logs(void)
EXPECT(ARRAY_SIZE(want) == len);
for (i = 0; i < len; i++) {
- EXPECT(reftable_log_record_equal(&want[i], &out[i],
+ EXPECT(reftable_log_record_equal(want[i], &out[i],
GIT_SHA1_RAWSZ));
}