[rtems commit] testsuites/dhrystone: Initialize before use

Joel Sherrill joel at rtems.org
Tue Mar 5 14:49:47 UTC 2024


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

Author:    Kinsey Moore <kinsey.moore at oarcorp.com>
Date:      Wed Feb 28 12:12:28 2024 -0600

testsuites/dhrystone: Initialize before use

This resovles a warning where a variable could be used before it is
initialized in some code paths.

---

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

diff --git a/testsuites/benchmarks/dhrystone/dhry_1.c b/testsuites/benchmarks/dhrystone/dhry_1.c
index 3ad2e7f204..ef6ecf9251 100644
--- a/testsuites/benchmarks/dhrystone/dhry_1.c
+++ b/testsuites/benchmarks/dhrystone/dhry_1.c
@@ -133,6 +133,7 @@ execution_start:
 
 #ifdef __rtems__
   /* avoid used uninitialized warning */
+  Int_1_Loc = 0;
   Int_2_Loc = 0;
 #endif
 



More information about the vc mailing list