aboutsummaryrefslogtreecommitdiffstats
path: root/diffcore-rename.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-12-18 10:43:16 -0800
committerJunio C Hamano <gitster@pobox.com>2024-12-18 10:43:16 -0800
commit913a1e157c326ee2e0c9e2074090b6b7f2a62722 (patch)
treeef5ae449437fb0d46fd45e37b248793bb6a16f51 /diffcore-rename.c
parentMerge https://github.com/j6t/gitk (diff)
parentt/helper: don't depend on implicit wraparound (diff)
downloadgit-913a1e157c326ee2e0c9e2074090b6b7f2a62722.tar.gz
git-913a1e157c326ee2e0c9e2074090b6b7f2a62722.zip
Merge branch 'ps/build-sign-compare' into ps/the-repository
* 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 'diffcore-rename.c')
-rw-r--r--diffcore-rename.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/diffcore-rename.c b/diffcore-rename.c
index 1b1c1a6a1f..10bb0321b1 100644
--- a/diffcore-rename.c
+++ b/diffcore-rename.c
@@ -688,7 +688,6 @@ static void cleanup_dir_rename_info(struct dir_rename_info *info,
struct hashmap_iter iter;
struct strmap_entry *entry;
struct string_list to_remove = STRING_LIST_INIT_NODUP;
- int i;
if (!info->setup)
return;
@@ -734,7 +733,7 @@ static void cleanup_dir_rename_info(struct dir_rename_info *info,
if (strintmap_contains(counts, UNKNOWN_DIR))
strintmap_remove(counts, UNKNOWN_DIR);
}
- for (i = 0; i < to_remove.nr; ++i)
+ for (size_t i = 0; i < to_remove.nr; ++i)
strmap_remove(info->dir_rename_count,
to_remove.items[i].string, 1);
string_list_clear(&to_remove, 0);