summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Menzel <pmenzel@molgen.mpg.de>2017-10-27 10:58:00 +0200
committerNico Huber <nico.h@gmx.de>2017-11-03 07:51:56 +0000
commitb843c5e3f32ebd57605d96e3bb0c6a714ac12900 (patch)
tree6fdfb89309085279b10f114322b6a49e51a4f7bd /src
parent57ea9b41e72a2ef6f14c2c77973d7fc389256aab (diff)
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 <pmenzel@molgen.mpg.de> Reviewed-on: https://review.coreboot.org/22197 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Diffstat (limited to 'src')
-rw-r--r--src/lib/reg_script.c1
1 files changed, 0 insertions, 1 deletions
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;