diff options
| author | Jeff King <peff@peff.net> | 2026-04-02 00:15:16 -0400 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-04-01 22:08:53 -0700 |
| commit | f1b8a4d10888922eacaa9552d9925d3330ed5d8b (patch) | |
| tree | f8eedbcdc4f30c909aabb11836b772be1fc63d16 /contrib/persistent-https | |
| parent | 8a0566b42b133b73423c801a7ab6f356de69f51a (diff) | |
| download | git-f1b8a4d10888922eacaa9552d9925d3330ed5d8b.tar.gz git-f1b8a4d10888922eacaa9552d9925d3330ed5d8b.zip | |
refs/files-backend: drop const to fix strchr() warning
In show_one_reflog_ent(), we're fed a writable strbuf buffer, which we
parse into the various reflog components. We write a NUL over email_end
to tie off one of the fields, and thus email_end must be non-const.
But with a C23 implementation of libc, strchr() will now complain when
assigning the result to a non-const pointer from a const one. So we can
fix this by making the source pointer non-const.
But there's a catch. We derive that source pointer by parsing the line
with parse_oid_hex_algop(), which requires a const pointer for its
out-parameter. We can work around that by teaching it to use our
CONST_OUTPARAM() trick, just like skip_prefix().
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions
