qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: qemu-devel@nongnu.org
Cc: Stefan Weil <sw@weilnetz.de>, Alexander Graf <agraf@suse.de>,
	Blue Swirl <blauwirbel@gmail.com>,
	Aurelien Jarno <aurelien@aurel32.net>
Subject: [Qemu-devel] [PATCH 3/3] tcg-sparc: Fix set-but-not used warnings.
Date: Wed,  9 Nov 2011 10:03:35 -0800	[thread overview]
Message-ID: <1320861815-14317-4-git-send-email-rth@twiddle.net> (raw)
In-Reply-To: <1320861815-14317-1-git-send-email-rth@twiddle.net>

In both cases, val is computed, but then not used in the
subsequent line, which then re-computes the quantity in
a different type (int32_t vs unsigned long).

Keep the computation type that's been working so far.

Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 tcg/sparc/tcg-target.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/tcg/sparc/tcg-target.c b/tcg/sparc/tcg-target.c
index b96312b..5cd5a3b 100644
--- a/tcg/sparc/tcg-target.c
+++ b/tcg/sparc/tcg-target.c
@@ -473,11 +473,9 @@ static inline void tcg_out_nop(TCGContext *s)
 
 static void tcg_out_branch_i32(TCGContext *s, int opc, int label_index)
 {
-    int32_t val;
     TCGLabel *l = &s->labels[label_index];
 
     if (l->has_value) {
-        val = l->u.value - (tcg_target_long)s->code_ptr;
         tcg_out32(s, (INSN_OP(0) | INSN_COND(opc, 0) | INSN_OP2(0x2)
                       | INSN_OFF22(l->u.value - (unsigned long)s->code_ptr)));
     } else {
@@ -489,11 +487,9 @@ static void tcg_out_branch_i32(TCGContext *s, int opc, int label_index)
 #if TCG_TARGET_REG_BITS == 64
 static void tcg_out_branch_i64(TCGContext *s, int opc, int label_index)
 {
-    int32_t val;
     TCGLabel *l = &s->labels[label_index];
 
     if (l->has_value) {
-        val = l->u.value - (tcg_target_long)s->code_ptr;
         tcg_out32(s, (INSN_OP(0) | INSN_COND(opc, 0) | INSN_OP2(0x1) |
                       (0x5 << 19) |
                       INSN_OFF19(l->u.value - (unsigned long)s->code_ptr)));
-- 
1.7.6.4

  parent reply	other threads:[~2011-11-09 18:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-09 18:03 [Qemu-devel] [PATCH 0/3] Standardize on TCGReg for entry points Richard Henderson
2011-11-09 18:03 ` [Qemu-devel] [PATCH 1/3] tcg: Standardize on TCGReg as the enum for hard registers Richard Henderson
2011-11-09 18:03 ` [Qemu-devel] [PATCH 2/3] tcg: Use TCGReg for standard tcg-target entry points Richard Henderson
2011-11-09 18:03 ` Richard Henderson [this message]
2011-11-19 13:59   ` [Qemu-devel] [PATCH 3/3] tcg-sparc: Fix set-but-not used warnings Blue Swirl
2011-11-09 18:51 ` [Qemu-devel] [PATCH 0/3] Standardize on TCGReg for entry points Andreas Färber
2011-11-09 20:19 ` Stefan Weil
2011-11-09 22:11   ` Richard Henderson
2011-11-10 13:40 ` Alexander Graf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1320861815-14317-4-git-send-email-rth@twiddle.net \
    --to=rth@twiddle.net \
    --cc=agraf@suse.de \
    --cc=aurelien@aurel32.net \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sw@weilnetz.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).