mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
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:
2
deps/clar/clar.c
vendored
2
deps/clar/clar.c
vendored
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user