summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-12-06 11:27:27 +0100
committerJunio C Hamano <gitster@pobox.com>2024-12-06 20:20:04 +0900
commit87318f2b6ed371814cb53c91a458b336f175b325 (patch)
treec0aaa2fe3390fc8b658216c2758075ab1e4285d4 /commit.c
parent7d200af27f41b8732dcb1a6c01ff73b7b7b0ecc1 (diff)
gpg-interface: address -Wsign-comparison warnings
There are a couple of -Wsign-comparison warnings in "gpg-interface.c". Most of them are trivial and simply using signed integers to loop towards an upper unsigned bound. But in `parse_signed_buffer()` we have one case where the different signedness of the two values of a ternary expression results in a warning. Given that: - `size` will always be bigger than `len` due to the loop condition. - `eol` will always be after `buf + len` because it is found via memchr(3p) starting from `buf + len`. We know that both values will always be natural integers. Squelch the warning by casting the left-hand side to `size_t`. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions