From b843c5e3f32ebd57605d96e3bb0c6a714ac12900 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Fri, 27 Oct 2017 10:58:00 +0200 Subject: lib/reg_script.c: Remove unused assignment Fix the warning below. ``` CC bootblock/lib/reg_script.o src/lib/reg_script.c:375:11: warning: Value stored to 'value' during its \ initialization is never read uint64_t value = msr.hi; ^~~~~ ~~~~~~ ``` Found-by: Clang static analyzer scan-build (clang version 4.0.1-6 (tags/RELEASE_401/final)) Fixes: fd461e39 (regscript: Add support for MSR type) Change-Id: I218e45d12f2f00e2ad4cfe5410029f407b57568d Signed-off-by: Paul Menzel Reviewed-on: https://review.coreboot.org/22197 Tested-by: build bot (Jenkins) Reviewed-by: Duncan Laurie --- src/lib/reg_script.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/reg_script.c b/src/lib/reg_script.c index 56285f1ce1..e84c1379b0 100644 --- a/src/lib/reg_script.c +++ b/src/lib/reg_script.c @@ -373,7 +373,6 @@ static uint64_t reg_script_read_msr(struct reg_script_context *ctx) const struct reg_script *step = reg_script_get_step(ctx); msr_t msr = rdmsr(step->reg); uint64_t value = msr.hi; - value = msr.hi; value <<= 32; value |= msr.lo; return value; -- cgit v1.2.3