diff options
author | Ming Wei | 2018-02-07 10:53:45 -0600 |
---|---|---|
committer | Ming Wei | 2018-02-07 10:53:45 -0600 |
commit | b9640b5441d2545734b50362df78f0b44266ee2f (patch) | |
tree | 7fb348a58a62a7db7ea2656eafcb7528fb880ac2 | |
parent | 2780f46c95c1bae655a42b43063ce59c225a0f94 (diff) | |
download | posix-smp-b9640b5441d2545734b50362df78f0b44266ee2f.tar.gz posix-smp-b9640b5441d2545734b50362df78f0b44266ee2f.tar.xz posix-smp-b9640b5441d2545734b50362df78f0b44266ee2f.zip |
posix-smp: fix the rest of the klocworks errors
Signed-off-by: Ming Wei <mwei@ti.com>
-rw-r--r-- | dhry_1.c | 24 |
1 files changed, 19 insertions, 5 deletions
@@ -170,11 +170,11 @@ void *dhryThread (void *arg) | |||
170 | /* main program, corresponds to procedures */ | 170 | /* main program, corresponds to procedures */ |
171 | /* Main and Proc_0 in the Ada version */ | 171 | /* Main and Proc_0 in the Ada version */ |
172 | { | 172 | { |
173 | One_Fifty Int_1_Loc; | 173 | One_Fifty Int_1_Loc = 0; |
174 | REG One_Fifty Int_2_Loc; | 174 | REG One_Fifty Int_2_Loc = 0; |
175 | One_Fifty Int_3_Loc; | 175 | One_Fifty Int_3_Loc = 0; |
176 | REG char Ch_Index; | 176 | REG char Ch_Index; |
177 | Enumeration Enum_Loc; | 177 | Enumeration Enum_Loc = Ident_1; |
178 | Str_30 Str_1_Loc; | 178 | Str_30 Str_1_Loc; |
179 | Str_30 Str_2_Loc; | 179 | Str_30 Str_2_Loc; |
180 | REG int Run_Index; | 180 | REG int Run_Index; |
@@ -243,7 +243,21 @@ extern clock_t clock(); | |||
243 | strcpy (inst.Ptr_Glob->variant.var_1.Str_Comp, | 243 | strcpy (inst.Ptr_Glob->variant.var_1.Str_Comp, |
244 | "DHRYSTONE PROGRAM, SOME STRING"); | 244 | "DHRYSTONE PROGRAM, SOME STRING"); |
245 | strcpy (Str_1_Loc, "DHRYSTONE PROGRAM, 1'ST STRING"); | 245 | strcpy (Str_1_Loc, "DHRYSTONE PROGRAM, 1'ST STRING"); |
246 | 246 | strcpy (Str_2_Loc, "UNKNOWN"); | |
247 | |||
248 | inst.Arr_1_Glob[8] = 0; | ||
249 | inst.Bool_Glob = 0; | ||
250 | inst.Ch_1_Glob = ' '; | ||
251 | inst.Ch_2_Glob = ' '; | ||
252 | inst.Int_Glob = 0; | ||
253 | inst.Next_Ptr_Glob->Discr = Ident_1; | ||
254 | /* Was missing in published program. Without this statement, */ | ||
255 | /* inst.Arr_1_Glob [8] would have an undefined value. */ | ||
256 | /* inst.Bool_Glob would have an undefined value. */ | ||
257 | /* inst.Ch_1_Glob would have an undefined value. */ | ||
258 | /* inst.Ch_2_Glob would have an undefined value. */ | ||
259 | /* inst.Int_Glob would have an undefined value. */ | ||
260 | /* inst.inst.Next_Ptr_Glob->Discr would have an undefined value.*/ | ||
247 | inst.Arr_2_Glob [8][7] = 10; | 261 | inst.Arr_2_Glob [8][7] = 10; |
248 | /* Was missing in published program. Without this statement, */ | 262 | /* Was missing in published program. Without this statement, */ |
249 | /* Arr_2_Glob [8][7] would have an undefined value. */ | 263 | /* Arr_2_Glob [8][7] would have an undefined value. */ |