Remove a useless variable, spotted by clang analyzer:
/src/qemu/target-sparc/op_helper.c:3904:18: warning: unused variable
'tmp' [-Wunused-variable]
    target_ulong tmp = val;
The error message is actually incorrect since the variable is used.

Signed-off-by: Blue Swirl <blauwir...@gmail.com>
---
 target-sparc/op_helper.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c
index d1a8dd9..48e1db8 100644
--- a/target-sparc/op_helper.c
+++ b/target-sparc/op_helper.c
@@ -3901,10 +3901,8 @@ target_ulong cpu_get_ccr(CPUState *env1)

 static void put_ccr(target_ulong val)
 {
-    target_ulong tmp = val;
-
-    env->xcc = (tmp >> 4) << 20;
-    env->psr = (tmp & 0xf) << 20;
+    env->xcc = (val >> 4) << 20;
+    env->psr = (val & 0xf) << 20;
     CC_OP = CC_OP_FLAGS;
 }

-- 
1.6.2.4
From c532ec1bf51f11d7a57dfb8999a4fd9edd7c56cb Mon Sep 17 00:00:00 2001
Message-Id: <c532ec1bf51f11d7a57dfb8999a4fd9edd7c56cb.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:32:23 +0000
Subject: [PATCH 9/9] Sparc64: remove useless variable

Remove a useless variable, spotted by clang analyzer:
/src/qemu/target-sparc/op_helper.c:3904:18: warning: unused variable 'tmp' [-Wunused-variable]
    target_ulong tmp = val;
The error message is actually incorrect since the variable is used.

Signed-off-by: Blue Swirl <blauwir...@gmail.com>
---
 target-sparc/op_helper.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c
index d1a8dd9..48e1db8 100644
--- a/target-sparc/op_helper.c
+++ b/target-sparc/op_helper.c
@@ -3901,10 +3901,8 @@ target_ulong cpu_get_ccr(CPUState *env1)
 
 static void put_ccr(target_ulong val)
 {
-    target_ulong tmp = val;
-
-    env->xcc = (tmp >> 4) << 20;
-    env->psr = (tmp & 0xf) << 20;
+    env->xcc = (val >> 4) << 20;
+    env->psr = (val & 0xf) << 20;
     CC_OP = CC_OP_FLAGS;
 }
 
-- 
1.7.2.5

Reply via email to