summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2780f46)
raw | patch | inline | side by side (parent: 2780f46)
author | Ming Wei <mwei@ti.com> | |
Wed, 7 Feb 2018 16:53:45 +0000 (10:53 -0600) | ||
committer | Ming Wei <mwei@ti.com> | |
Wed, 7 Feb 2018 16:53:45 +0000 (10:53 -0600) |
Signed-off-by: Ming Wei <mwei@ti.com>
dhry_1.c | patch | blob | history |
diff --git a/dhry_1.c b/dhry_1.c
index b7264ab955aaed22f1d2893ea145ffe2269e2b58..687d424bce815784689c1f71e9a0e09b7028ea08 100644 (file)
--- a/dhry_1.c
+++ b/dhry_1.c
/* main program, corresponds to procedures */
/* Main and Proc_0 in the Ada version */
{
- One_Fifty Int_1_Loc;
- REG One_Fifty Int_2_Loc;
- One_Fifty Int_3_Loc;
+ One_Fifty Int_1_Loc = 0;
+ REG One_Fifty Int_2_Loc = 0;
+ One_Fifty Int_3_Loc = 0;
REG char Ch_Index;
- Enumeration Enum_Loc;
+ Enumeration Enum_Loc = Ident_1;
Str_30 Str_1_Loc;
Str_30 Str_2_Loc;
REG int Run_Index;
strcpy (inst.Ptr_Glob->variant.var_1.Str_Comp,
"DHRYSTONE PROGRAM, SOME STRING");
strcpy (Str_1_Loc, "DHRYSTONE PROGRAM, 1'ST STRING");
-
+ strcpy (Str_2_Loc, "UNKNOWN");
+
+ inst.Arr_1_Glob[8] = 0;
+ inst.Bool_Glob = 0;
+ inst.Ch_1_Glob = ' ';
+ inst.Ch_2_Glob = ' ';
+ inst.Int_Glob = 0;
+ inst.Next_Ptr_Glob->Discr = Ident_1;
+ /* Was missing in published program. Without this statement, */
+ /* inst.Arr_1_Glob [8] would have an undefined value. */
+ /* inst.Bool_Glob would have an undefined value. */
+ /* inst.Ch_1_Glob would have an undefined value. */
+ /* inst.Ch_2_Glob would have an undefined value. */
+ /* inst.Int_Glob would have an undefined value. */
+ /* inst.inst.Next_Ptr_Glob->Discr would have an undefined value.*/
inst.Arr_2_Glob [8][7] = 10;
/* Was missing in published program. Without this statement, */
/* Arr_2_Glob [8][7] would have an undefined value. */