Commit 02c88f2
DynamicTablesPkg: Fix used uninitialized warning from CLANG toolchains
The compiler is not spotting that the inverse of the same conditions has
already been checked, therefore either the 'if' or the 'else if' has to
happen. On the other hand, it is misleading coding to use 'else if' for
something that has to happen given earlier checks.
This fixes the misleading coding and the warning.
We definitely want to keep the warning enabled, as it has caught several
genuine cases of uninitialized use.
Signed-off-by: Mike Beaton <[email protected]>1 parent 4c8ba6a commit 02c88f2
File tree
1 file changed
+6
-7
lines changed- DynamicTablesPkg/Library/Common/DynamicPlatRepoLib
1 file changed
+6
-7
lines changedLines changed: 6 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | 293 | | |
301 | 294 | | |
302 | 295 | | |
| |||
315 | 308 | | |
316 | 309 | | |
317 | 310 | | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
318 | 317 | | |
319 | 318 | | |
320 | 319 | | |
| |||
0 commit comments