[PATCH 2/2] testsuites/dhrystone: Initialize before use

Kinsey Moore kinsey.moore at oarcorp.com
Wed Feb 28 18:15:16 UTC 2024


This resovles a warning where a variable could be used before it is
initialized in some code paths.
---
 testsuites/benchmarks/dhrystone/dhry_1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testsuites/benchmarks/dhrystone/dhry_1.c b/testsuites/benchmarks/dhrystone/dhry_1.c
index 3ad2e7f204..e493f86a15 100644
--- a/testsuites/benchmarks/dhrystone/dhry_1.c
+++ b/testsuites/benchmarks/dhrystone/dhry_1.c
@@ -80,7 +80,7 @@ int main (int argc, char **argv)
   /* main program, corresponds to procedures        */
   /* Main and Proc_0 in the Ada version             */
 {
-        One_Fifty       Int_1_Loc;
+        One_Fifty       Int_1_Loc = 0;
   REG   One_Fifty       Int_2_Loc;
         One_Fifty       Int_3_Loc;
   REG   char            Ch_Index;
-- 
2.39.2



More information about the devel mailing list