From 5919da6f05a225907a54f239a725e67c7989a2a0 Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Mon, 25 Nov 2013 11:25:04 +0800 Subject: [PATCH] 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. --- tests/abitest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/abitest.c b/tests/abitest.c index 7b12144..d3e151f 100644 --- a/tests/abitest.c +++ b/tests/abitest.c @@ -339,8 +339,8 @@ static int stdarg_test(void) { "#include \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"