summaryrefslogtreecommitdiffstats
path: root/strvec.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-12-23 18:32:10 +0100
committerJunio C Hamano <gitster@pobox.com>2024-12-23 18:32:11 +0100
commit4156b6a741c7fb15a4eccb320612fb6e453f439c (patch)
tree203f68166cc5f2337fd80f6628c3b344d2dd3abf /strvec.c
parentMerge branch 'kn/reftable-writer-log-write-verify' (diff)
parentt/helper: don't depend on implicit wraparound (diff)
downloadgit-4156b6a741c7fb15a4eccb320612fb6e453f439c.tar.xz
git-4156b6a741c7fb15a4eccb320612fb6e453f439c.zip
Merge branch 'ps/build-sign-compare'
Start working to make the codebase buildable with -Wsign-compare. * ps/build-sign-compare: t/helper: don't depend on implicit wraparound scalar: address -Wsign-compare warnings builtin/patch-id: fix type of `get_one_patchid()` builtin/blame: fix type of `length` variable when emitting object ID gpg-interface: address -Wsign-comparison warnings daemon: fix type of `max_connections` daemon: fix loops that have mismatching integer types global: trivial conversions to fix `-Wsign-compare` warnings pkt-line: fix -Wsign-compare warning on 32 bit platform csum-file: fix -Wsign-compare warning on 32-bit platform diff.h: fix index used to loop through unsigned integer config.mak.dev: drop `-Wno-sign-compare` global: mark code units that generate warnings with `-Wsign-compare` compat/win32: fix -Wsign-compare warning in "wWinMain()" compat/regex: explicitly ignore "-Wsign-compare" warnings git-compat-util: introduce macros to disable "-Wsign-compare" warnings
Diffstat (limited to 'strvec.c')
-rw-r--r--strvec.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/strvec.c b/strvec.c
index d67596e571..f8de79f557 100644
--- a/strvec.c
+++ b/strvec.c
@@ -130,8 +130,7 @@ void strvec_split(struct strvec *array, const char *to_split)
void strvec_clear(struct strvec *array)
{
if (array->v != empty_strvec) {
- int i;
- for (i = 0; i < array->nr; i++)
+ for (size_t i = 0; i < array->nr; i++)
free((char *)array->v[i]);
free(array->v);
}