From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35685) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROCVe-0008Kr-FD for qemu-devel@nongnu.org; Wed, 09 Nov 2011 13:04:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ROCVd-0005fI-Do for qemu-devel@nongnu.org; Wed, 09 Nov 2011 13:04:26 -0500 Received: from mail-qw0-f45.google.com ([209.85.216.45]:45307) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROCVd-0005eM-BW for qemu-devel@nongnu.org; Wed, 09 Nov 2011 13:04:25 -0500 Received: by mail-qw0-f45.google.com with SMTP id z3so2364892qad.4 for ; Wed, 09 Nov 2011 10:04:25 -0800 (PST) Sender: Richard Henderson From: Richard Henderson Date: Wed, 9 Nov 2011 10:03:35 -0800 Message-Id: <1320861815-14317-4-git-send-email-rth@twiddle.net> In-Reply-To: <1320861815-14317-1-git-send-email-rth@twiddle.net> References: <1320861815-14317-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH 3/3] tcg-sparc: Fix set-but-not used warnings. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Stefan Weil , Alexander Graf , Blue Swirl , Aurelien Jarno 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 --- 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