This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] fix uninitialized variable in testsuite


I found that the test cls_many_mixed_args.c was failing due to an uninitialized variable. This patch fixes it. OK?

-Sandra
2013-10-10  Sandra Loosemore  <sandra@codesourcery.com>

	* testsuite/libffi.call/cls_many_mixed_args.c (cls_ret_double_fn):
	Fix uninitialized variable.
diff --git a/testsuite/libffi.call/cls_many_mixed_args.c b/testsuite/libffi.call/cls_many_mixed_args.c
index fc75b1d..18cdfcc 100644
--- a/testsuite/libffi.call/cls_many_mixed_args.c
+++ b/testsuite/libffi.call/cls_many_mixed_args.c
@@ -15,7 +15,7 @@ static void cls_ret_double_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
 			      void* userdata __UNUSED__)
 {
   int i;
-  double r;
+  double r = 0;
   double t;
   for(i = 0; i < NARGS; i++)
     {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]