clar: avoid iterator clobbered by longjmp

If the iterator is moved to a register, it may be clobbered by the
longjmp. Avoid this by treating it as volatile.
This commit is contained in:
Edward Thomson
2026-01-24 14:16:25 +00:00
parent 1a0bbabe30
commit 3ac6bf801c

2
deps/clar/clar.c vendored
View File

@@ -345,6 +345,8 @@ clar_run_test(
const struct clar_func *cleanup)
{
clar_time start, end;
int runs = test->runs;
volatile int i = 0;
_clar.last_report->start = time(NULL);
_clar.last_report->times = &_clar.last_report->time_mean;