]> Kevux Git Server - rit/commit
builtin/log: fix remaining -Wsign-compare warnings
authorPatrick Steinhardt <ps@pks.im>
Fri, 27 Dec 2024 10:46:27 +0000 (11:46 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 27 Dec 2024 16:11:46 +0000 (08:11 -0800)
commit1ab5948141e62b52bcb812b04a901b3efaf1b578
tree781b16ec10e4fd1340290242c6c52548824736df
parent0905ed201a87bc97dc4d47c0cb8fd65316f33269
builtin/log: fix remaining -Wsign-compare warnings

Fix remaining -Wsign-compare warnings in "builtin/log.c" and mark the
file as -Wsign-compare-clean. While most of the fixes are obvious, one
fix requires us to use `cast_size_t_to_int()`, which will cause us to
die in case the `size_t` cannot be represented as `int`. This should be
fine though, as the data would typically be set either via a config key
or via the command line, neither of which should ever exceed a couple of
kilobytes of data.

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