diff options
author | Richard Spiegel <richard.spiegel@amd.corp-partner.google.com> | 2018-08-08 09:45:23 -0700 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2018-08-09 16:05:45 +0000 |
commit | 43bd594af9db261e1afe32da8f6a65f0df4976a9 (patch) | |
tree | 78577447f37789be7c6a695e04a96c6398e820e0 /src/cpu | |
parent | ece26961b9fadbec5e7424bd91f10f600430e975 (diff) | |
download | coreboot-43bd594af9db261e1afe32da8f6a65f0df4976a9.tar.xz |
cpu/x86/mp_init.c: Avoid static analysis error for unused value
Within procedure save_bsp_msrs, the structure pointer "msr_entry" is updated
every time procedure save_msr() is called. However, after the last call of
save_msr(), "msr_entry" is not used, thus causing a static analysis error.
Add a "(void)msr_entry;" at the end to avoid the static analysis error.
BUG=b:112253891
TEST=Build and boot grunt.
Change-Id: If0fb336fbf49eec3da255fadbe38b3a38768d0cf
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/27956
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/cpu')
-rw-r--r-- | src/cpu/x86/mp_init.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c index ff02b16eed..08cd1f50b3 100644 --- a/src/cpu/x86/mp_init.c +++ b/src/cpu/x86/mp_init.c @@ -297,6 +297,9 @@ static int save_bsp_msrs(char *start, int size) fixed_mtrrs_hide_amd_rwdram(); + /* Tell static analysis we know value is left unused. */ + (void)msr_entry; + return msr_count; } |