Avoid these warnings from clang analyzer: /src/qemu/target-i386/kvm.c:772:5: warning: Value stored to 'cwd' is never read cwd = swd = twd = 0; /src/qemu/target-i386/kvm.c:772:11: warning: Although the value stored to 'swd' is used in the enclosing expression, the value is never actually read from 'swd' cwd = swd = twd = 0;
Signed-off-by: Blue Swirl <blauwir...@gmail.com> --- target-i386/kvm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 70ef74b..22b1dd0 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -769,7 +769,7 @@ static int kvm_put_xsave(CPUState *env) xsave = qemu_memalign(4096, sizeof(struct kvm_xsave)); memset(xsave, 0, sizeof(struct kvm_xsave)); - cwd = swd = twd = 0; + twd = 0; swd = env->fpus & ~(7 << 11); swd |= (env->fpstt & 7) << 11; cwd = env->fpuc; -- 1.6.2.4
From 93a750bfabac20ec5da32c4ee6ff1d33c464cd1e Mon Sep 17 00:00:00 2001 Message-Id: <93a750bfabac20ec5da32c4ee6ff1d33c464cd1e.1315150286.git.blauwir...@gmail.com> In-Reply-To: <70f99a25b7732d4c9ea54f74c089ccb9bb323ea6.1315150286.git.blauwir...@gmail.com> References: <70f99a25b7732d4c9ea54f74c089ccb9bb323ea6.1315150286.git.blauwir...@gmail.com> From: Blue Swirl <blauwir...@gmail.com> Date: Sun, 4 Sep 2011 11:03:52 +0000 Subject: [PATCH 5/9] kvm: remove unnecessary assignments Avoid these warnings from clang analyzer: /src/qemu/target-i386/kvm.c:772:5: warning: Value stored to 'cwd' is never read cwd = swd = twd = 0; /src/qemu/target-i386/kvm.c:772:11: warning: Although the value stored to 'swd' is used in the enclosing expression, the value is never actually read from 'swd' cwd = swd = twd = 0; Signed-off-by: Blue Swirl <blauwir...@gmail.com> --- target-i386/kvm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 70ef74b..22b1dd0 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -769,7 +769,7 @@ static int kvm_put_xsave(CPUState *env) xsave = qemu_memalign(4096, sizeof(struct kvm_xsave)); memset(xsave, 0, sizeof(struct kvm_xsave)); - cwd = swd = twd = 0; + twd = 0; swd = env->fpus & ~(7 << 11); swd |= (env->fpstt & 7) << 11; cwd = env->fpuc; -- 1.7.2.5