]> git.ipfire.org Git - thirdparty/git.git/commit
global: trivial conversions to fix `-Wsign-compare` warnings
authorPatrick Steinhardt <ps@pks.im>
Fri, 6 Dec 2024 10:27:24 +0000 (11:27 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 6 Dec 2024 11:20:04 +0000 (20:20 +0900)
commit80c9e70ebe871f0826bc101142c66ff783405100
treec95f04cef2dc0abb2d1fe8e4470e9e385e637b12
parent25435e4ad87aa484ce0d9d2adf3aa407f0241704
global: trivial conversions to fix `-Wsign-compare` warnings

We have a bunch of loops which iterate up to an unsigned boundary using
a signed index, which generates warnigs because we compare a signed and
unsigned value in the loop condition. Address these sites for trivial
cases and enable `-Wsign-compare` warnings for these code units.

This patch only adapts those code units where we can drop the
`DISABLE_SIGN_COMPARE_WARNINGS` macro in the same step.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
55 files changed:
advice.c
base85.c
builtin/add.c
builtin/branch.c
builtin/difftool.c
builtin/for-each-repo.c
builtin/help.c
builtin/mailsplit.c
builtin/merge-tree.c
builtin/pack-redundant.c
builtin/pull.c
builtin/push.c
builtin/rerere.c
builtin/stash.c
builtin/submodule--helper.c
builtin/var.c
commit.c
compat/fsmonitor/fsm-listen-darwin.c
compat/terminal.c
diagnose.c
diffcore-rename.c
entry.c
ewah/ewah_bitmap.c
git.c
help.h
hex.c
http-push.c
list-objects-filter-options.c
list-objects.c
ls-refs.c
merge.c
path.c
pkt-line.c
refs/debug.c
send-pack.c
serve.c
strvec.c
t/helper/test-bloom.c
t/helper/test-dump-fsmonitor.c
t/helper/test-dump-split-index.c
t/helper/test-dump-untracked-cache.c
t/helper/test-hash-speed.c
t/helper/test-parse-options.c
t/helper/test-reach.c
t/helper/test-ref-store.c
t/helper/test-tool.c
t/unit-tests/t-example-decorate.c
t/unit-tests/t-prio-queue.c
tmp-objdir.c
trailer.c
transport-helper.c
transport.c
usage.c
version.c
versioncmp.c