diff options
author | Paul Menzel <pmenzel@molgen.mpg.de> | 2017-10-27 10:58:00 +0200 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2017-11-03 07:51:56 +0000 |
commit | b843c5e3f32ebd57605d96e3bb0c6a714ac12900 (patch) | |
tree | 6fdfb89309085279b10f114322b6a49e51a4f7bd | |
parent | 57ea9b41e72a2ef6f14c2c77973d7fc389256aab (diff) | |
download | coreboot-b843c5e3f32ebd57605d96e3bb0c6a714ac12900.tar.xz |
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>
-rw-r--r-- | src/lib/reg_script.c | 1 |
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; |