Hello John Zhao,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/34249
to review the following change.
Change subject: cpu/x86: Initialize the argument value msr_index ......................................................................
cpu/x86: Initialize the argument value msr_index
Clang Static Analyzer version 8.0.0 treats the uninitialized argument value msr_index as logic error in a function call. Just set msr_index with 0 initially.
Change-Id: I051b290998207a1129ada06bb455f44c2d291975 Signed-off-by: John Zhao john.zhao@intel.com --- M src/cpu/x86/mtrr/mtrr.c 1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/49/34249/1
diff --git a/src/cpu/x86/mtrr/mtrr.c b/src/cpu/x86/mtrr/mtrr.c index 98449d5..4dc71d6 100644 --- a/src/cpu/x86/mtrr/mtrr.c +++ b/src/cpu/x86/mtrr/mtrr.c @@ -321,6 +321,7 @@
fixed_mtrrs_expose_amd_rwdram();
+ memset(&msr_index, 0, sizeof(msr_index)); memset(&fixed_msrs, 0, sizeof(fixed_msrs));
msr_num = 0;