convert: widen gather_convert_stats() helpers to size_t

Prep for the upcoming read_blob_data_from_index() widening, whose
callers in convert.c feed the size they receive straight into these
two helpers. Both are file-static, so the change is contained.

Also fixes a small pre-existing narrowing on the get_wt_convert_stats_ascii()
path, where strbuf.len (size_t) was passed to a unsigned long
parameter.

Assisted-by: Opus 4.7
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin
2026-06-05 16:44:00 +02:00
committed by Git for Windows Build Agent
parent c235fc10a1
commit ec7073bbf1

View File

@@ -102,7 +102,7 @@ static int convert_is_binary(const struct text_stat *stats)
return 0;
}
static unsigned int gather_convert_stats(const char *data, unsigned long size)
static unsigned int gather_convert_stats(const char *data, size_t size)
{
struct text_stat stats;
int ret = 0;
@@ -119,7 +119,7 @@ static unsigned int gather_convert_stats(const char *data, unsigned long size)
return ret;
}
static const char *gather_convert_stats_ascii(const char *data, unsigned long size)
static const char *gather_convert_stats_ascii(const char *data, size_t size)
{
unsigned int convert_stats = gather_convert_stats(data, size);