Fix Windows warning about assigning in conditional expression

This commit is contained in:
Abdelrahman Said 2024-06-09 17:40:01 +01:00
parent 8eaa4afed1
commit a0acada9b4

View File

@ -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);