index: initialize best_len unnecessarily

gcc thinks this could be used uninitialized; cope with this.
This commit is contained in:
Edward Thomson
2026-05-11 09:51:40 +01:00
parent cd16dbb60f
commit c61e8e72b5

View File

@@ -1225,7 +1225,7 @@ static int canonicalize_directory_path(
{
const git_index_entry *match, *best = NULL;
char *search, *sep;
size_t pos, search_len, best_len;
size_t pos, search_len, best_len = 0;
if (!index->ignore_case)
return 0;