]> git.ipfire.org Git - thirdparty/git.git/commit
git-zlib: cast away potential constness of `next_in` pointer
authorPatrick Steinhardt <ps@pks.im>
Tue, 28 Jan 2025 08:41:33 +0000 (09:41 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 Jan 2025 21:03:23 +0000 (13:03 -0800)
commit9170c03fd7f970d594cbf8510515f6eb855d25a9
tree42270354515cac75a6e77a8c4bdf5302095f2c92
parentbb5d35c1a871cb1d8e4301e7b9b04e3266aec7f6
git-zlib: cast away potential constness of `next_in` pointer

The `struct git_zstream::next_in` variable points to the input data and
is used in combination with `struct z_stream::next_in`. While that
latter field is not marked as a constant in zlib, it is marked as such
in zlib-ng. This causes a couple of compiler errors when we try to
assign these fields to one another due to mismatching constness.

Fix the issue by casting away the potential constness of `next_in`.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-zlib.c