Fix Windows warning about assigning in conditional expression
This commit is contained in:
parent
8eaa4afed1
commit
a0acada9b4
@ -15,15 +15,17 @@ void run_tests(TestFunc *func1, ...) {
|
|||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, func1);
|
va_start(args, func1);
|
||||||
|
|
||||||
TestFunc *func = NULL;
|
TestFunc *func = va_arg(args, TestFunc *);
|
||||||
|
|
||||||
while ((func = va_arg(args, TestFunc *))) {
|
while (func) {
|
||||||
TestFuncResult result = func();
|
TestFuncResult result = func();
|
||||||
print_test_result(result);
|
print_test_result(result);
|
||||||
|
|
||||||
if (!result.passed) {
|
if (!result.passed) {
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func = va_arg(args, TestFunc *);
|
||||||
}
|
}
|
||||||
|
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
Loading…
Reference in New Issue
Block a user