[coreboot-gerrit] Change in coreboot[master]: cpu/x86/mp_init.c: Avoid static analysis error for unused value

Richard Spiegel (Code Review) gerrit at coreboot.org
Wed Aug 8 18:45:49 CEST 2018


Richard Spiegel has uploaded this change for review. ( https://review.coreboot.org/27956


Change subject: cpu/x86/mp_init.c: Avoid static analysis error for unused value
......................................................................

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 at silverbackltd.com>
---
M src/cpu/x86/mp_init.c
1 file changed, 1 insertion(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/56/27956/1

diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c
index d124721..4d8b028 100644
--- a/src/cpu/x86/mp_init.c
+++ b/src/cpu/x86/mp_init.c
@@ -296,6 +296,7 @@
 	msr_entry = save_msr(MTRR_DEF_TYPE_MSR, msr_entry);
 
 	fixed_mtrrs_hide_amd_rwdram();
+	(void)msr_entry;
 
 	return msr_count;
 }

-- 
To view, visit https://review.coreboot.org/27956
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If0fb336fbf49eec3da255fadbe38b3a38768d0cf
Gerrit-Change-Number: 27956
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Spiegel <richard.spiegel at silverbackltd.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180808/ac7d26ae/attachment.html>


More information about the coreboot-gerrit mailing list