Git fork

t/unit-tests/clar: fix -Wmaybe-uninitialized with -Og

When building with -Og on gcc 15.1.1, the build produces a warning. In
practice, though, this cannot be hit because `exact` acts as a guard and
that variable can only be set after `matchlen` is already initialized

Assign a default value to `matchlen` so that the warning is silenced.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Denton Liu and committed by
Junio C Hamano
3a7e783d eb883b05

+1 -1
+1 -1
t/unit-tests/clar/clar.c
··· 350 350 clar_run_suite(const struct clar_suite *suite, const char *filter) 351 351 { 352 352 const struct clar_func *test = suite->tests; 353 - size_t i, matchlen; 353 + size_t i, matchlen = 0; 354 354 struct clar_report *report; 355 355 int exact = 0; 356 356