From: "Han-Wen Nienhuys via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: avarab@gmail.com, Han-Wen Nienhuys <hanwenn@gmail.com>,
Han-Wen Nienhuys <hanwen@google.com>
Subject: [PATCH] reftable: avoid initializing structs from structs
Date: Thu, 13 Jan 2022 16:55:34 +0000 [thread overview]
Message-ID: <pull.1188.git.git.1642092934523.gitgitgadget@gmail.com> (raw)
From: Han-Wen Nienhuys <hanwen@google.com>
Apparently, the IBM xlc compiler doesn't like this.
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
---
reftable: avoid initializing structs from structs
Apparently, the IBM xlc compiler doesn't like this.
Signed-off-by: Han-Wen Nienhuys hanwen@google.com
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1188%2Fhanwen%2Freftable-xlc-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1188/hanwen/reftable-xlc-v1
Pull-Request: https://github.com/git/git/pull/1188
reftable/merged_test.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/reftable/merged_test.c b/reftable/merged_test.c
index 24461e8a802..abd34849fca 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));
}
base-commit: 1ffcbaa1a5f10c9f706314d77f88de20a4a498c2
--
gitgitgadget
next reply other threads:[~2022-01-13 16:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-13 16:55 Han-Wen Nienhuys via GitGitGadget [this message]
2022-01-13 17:13 ` [PATCH] reftable: avoid initializing structs from structs Ævar Arnfjörð Bjarmason
2022-01-13 17:40 ` Han-Wen Nienhuys
2022-01-13 19:15 ` Junio C Hamano
2022-01-13 20:00 ` Junio C Hamano
2022-01-17 13:07 ` Han-Wen Nienhuys
2022-01-17 19:08 ` 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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=pull.1188.git.git.1642092934523.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=hanwen@google.com \
--cc=hanwenn@gmail.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).