Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-03-28 22:10:04 +0300
committerJunio C Hamano <gitster@pobox.com>2022-03-28 23:58:10 +0300
commit33665d98e6bff90896ec5b9f8e8f1223b780a4d1 (patch)
treee2495a7add1e5e158c0567f70518500279f1f4fa /reftable/record_test.c
parentabf474a5dd901f28013c52155411a48fd4c09922 (diff)
reftable: make assignments portable to AIX xlc v12.01
Change the assignment syntax introduced in 66c0dabab5e (reftable: make reftable_record a tagged union, 2022-01-20) to be portable to AIX xlc v12.1: avar@gcc111:[/home/avar]xlc -qversion IBM XL C/C++ for AIX, V12.1 (5765-J02, 5725-C72) Version: 12.01.0000.0000 The error emitted before this was e.g.: "reftable/generic.c", line 133.26: 1506-196 (S) Initialization between types "char*" and "struct reftable_ref_record" is not allowed. The syntax in the pre-image is supported by e.g. xlc 13.01 on a newer AIX version: avar@gcc119:[/home/avar]xlc -qversion IBM XL C/C++ for AIX, V13.1.3 (5725-C72, 5765-J07) Version: 13.01.0003.0006 But as we've otherwise supported this compiler let's not break it entirely if it's easy to work around it. Suggested-by: René Scharfe <l.s.r@web.de> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'reftable/record_test.c')
-rw-r--r--reftable/record_test.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/reftable/record_test.c b/reftable/record_test.c
index f91ea5e883..70ae78feca 100644
--- a/reftable/record_test.c
+++ b/reftable/record_test.c
@@ -339,7 +339,9 @@ static void test_reftable_obj_record_roundtrip(void)
};
struct reftable_record in = {
.type = BLOCK_TYPE_OBJ,
- .u.obj = recs[i],
+ .u = {
+ .obj = recs[i],
+ },
};
struct strbuf key = STRBUF_INIT;
struct reftable_record out = { .type = BLOCK_TYPE_OBJ };