[PATCH v2] testsuites/dhrystone: Initialize before use

Kinsey Moore kinsey.moore at oarcorp.com
Fri Mar 1 15:27:10 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 | 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
 
-- 
2.39.2



More information about the devel mailing list