[rtems commit] dhrystone/dhry_1.c: Fix may be used uninitialized warning

Joel Sherrill joel at rtems.org
Mon Apr 24 22:21:55 UTC 2017


Module:    rtems
Branch:    master
Commit:    906e67fe88658122d515a5dcc0570ee56a02877d
Changeset: http://git.rtems.org/rtems/commit/?id=906e67fe88658122d515a5dcc0570ee56a02877d

Author:    Joel Sherrill <joel at rtems.org>
Date:      Sun Apr 23 11:50:46 2017 -0500

dhrystone/dhry_1.c: Fix may be used uninitialized warning

---

 testsuites/benchmarks/dhrystone/dhry_1.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/testsuites/benchmarks/dhrystone/dhry_1.c b/testsuites/benchmarks/dhrystone/dhry_1.c
index 36ac303..9b64d3a 100644
--- a/testsuites/benchmarks/dhrystone/dhry_1.c
+++ b/testsuites/benchmarks/dhrystone/dhry_1.c
@@ -143,6 +143,11 @@ execution_start:
   Begin_Time = time ( (long *) 0);
 #endif
 
+#ifdef __rtems__
+  /* avoid used uninitialized warning */
+  Int_2_Loc = 0;
+#endif
+
   for (Run_Index = 1; Run_Index <= Number_Of_Runs; ++Run_Index)
   {
 




More information about the vc mailing list