mirror of
https://github.com/frida/tinycc
synced 2024-11-24 08:39:37 +03:00
Make abitest.c have predictable result
stdarg_test in abitest.c relies on a sum of some parameters made by both the caller and the callee to reach the same result. However, the variables used to store the temporary result of the additions are not initialized to 0, leading to uncertainty as to the results. This commit add this needed initialization.
This commit is contained in:
parent
4260ce1889
commit
5919da6f05
@ -339,8 +339,8 @@ static int stdarg_test(void) {
|
||||
"#include <stdarg.h>\n"
|
||||
"typedef struct {long long a, b, c;} stdarg_test_struct_type;\n"
|
||||
"void f(int n_int, int n_float, int n_struct, ...) {\n"
|
||||
" int i, ti;\n"
|
||||
" double td;\n"
|
||||
" int i, ti = 0;\n"
|
||||
" double td = 0.0;\n"
|
||||
" stdarg_test_struct_type ts = {0,0,0}, tmp;\n"
|
||||
" va_list ap;\n"
|
||||
" va_start(ap, n_struct);\n"
|
||||
|
Loading…
Reference in New Issue
Block a user