From 11b47801b2c3abc3bb8c523b722fafa1103bff45 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Wed, 2 Oct 2013 21:59:38 +0200 Subject: cpu/x86/mtrr/mtrr.c: Remove superfluous assignment to `type_index` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When building coreboot with the Clang static analyzer scan-build, it reports »Value stored to 'type_index' is never read«. Indeed, in `memranges_each_entry()` `type_index` is assigned a value before being read. So remove that line. Change-Id: I6da2fb8be7157bb98c57281babd4a08ca0d9f7a7 Signed-off-by: Paul Menzel Reviewed-on: http://review.coreboot.org/3953 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/cpu/x86/mtrr/mtrr.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/cpu/x86') diff --git a/src/cpu/x86/mtrr/mtrr.c b/src/cpu/x86/mtrr/mtrr.c index 8f1c35ec6e..d168978b54 100644 --- a/src/cpu/x86/mtrr/mtrr.c +++ b/src/cpu/x86/mtrr/mtrr.c @@ -261,7 +261,6 @@ static void calc_fixed_mtrrs(void) desc = &fixed_mtrr_desc[0]; last_desc = &fixed_mtrr_desc[ARRAY_SIZE(fixed_mtrr_desc) - 1]; - type_index = desc->range_index; memranges_each_entry(r, phys_addr_space) { begin = range_entry_base_mtrr_addr(r); -- cgit v1.2.3