From 43bd594af9db261e1afe32da8f6a65f0df4976a9 Mon Sep 17 00:00:00 2001 From: Richard Spiegel Date: Wed, 8 Aug 2018 09:45:23 -0700 Subject: 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 Reviewed-on: https://review.coreboot.org/27956 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/cpu/x86/mp_init.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/cpu') 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; } -- cgit v1.2.3